Merge pull request #85926 from NixOS/haskell-updates

Update Haskell package set to LTS 15.9 (plus other fixes)
wip/yesman
Peter Simons 4 years ago committed by GitHub
commit 7d30b4d1b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      doc/languages-frameworks/haskell.section.md
  2. 6
      pkgs/development/compilers/elm/default.nix
  3. 8
      pkgs/development/compilers/ghc/8.10.1.nix
  4. 2
      pkgs/development/compilers/ghc/8.4.4.nix
  5. 2
      pkgs/development/compilers/ghc/8.6.5.nix
  6. 236
      pkgs/development/compilers/ghc/8.8.1.nix
  7. 8
      pkgs/development/compilers/ghc/8.8.2.nix
  8. 2
      pkgs/development/compilers/ghc/8.8.3.nix
  9. 30
      pkgs/development/haskell-modules/configuration-common.nix
  10. 6
      pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
  11. 2
      pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix
  12. 6
      pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix
  13. 116
      pkgs/development/haskell-modules/configuration-hackage2nix.yaml
  14. 2878
      pkgs/development/haskell-modules/hackage-packages.nix
  15. 5
      pkgs/development/haskell-modules/lib.nix
  16. 333
      pkgs/development/haskell-modules/patches/darcs-2.14.2-Compile-against-GHC-8.8.patch
  17. 120
      pkgs/development/haskell-modules/patches/darcs-setup.patch
  18. 2
      pkgs/top-level/all-packages.nix
  19. 11
      pkgs/top-level/haskell-packages.nix

@ -110,8 +110,6 @@ haskell.compiler.ghc844 ghc-8.4.4
haskell.compiler.ghc863Binary ghc-8.6.3-binary
haskell.compiler.ghc865 ghc-8.6.5
haskell.compiler.integer-simple.ghc865 ghc-8.6.5
haskell.compiler.ghc881 ghc-8.8.1
haskell.compiler.integer-simple.ghc881 ghc-8.8.1
haskell.compiler.ghc882 ghc-8.8.2
haskell.compiler.integer-simple.ghc882 ghc-8.8.2
haskell.compiler.ghc883 ghc-8.8.3

@ -4,7 +4,7 @@
let
fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
hsPkgs = haskell.packages.ghc881.override {
hsPkgs = haskell.packages.ghc883.override {
overrides = self: super: with haskell.lib;
let elmPkgs = rec {
elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
@ -28,7 +28,7 @@ let
`package/nix/build.sh`
*/
elm-format = justStaticExecutables (overrideCabal (self.callPackage ./packages/elm-format.nix {}) (drv: {
# GHC 8.8.1 support
# GHC 8.8.3 support
# https://github.com/avh4/elm-format/pull/640
patches = [(
fetchpatch {
@ -39,7 +39,7 @@ let
# Tests are failing after upgrade to ghc881.
# Cause is probably just a minor change in stdout output
# see https://github.com/avh4/elm-format/pull/640
doCheck = false;
# doCheck = false;
jailbreak = true;
}));

@ -73,7 +73,7 @@ let
'';
# Splicer will pull out correct variations
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
@ -160,10 +160,10 @@ stdenv.mkDerivation (rec {
"--with-system-libffi"
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include"
"--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
@ -176,7 +176,7 @@ stdenv.mkDerivation (rec {
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.

@ -186,7 +186,7 @@ stdenv.mkDerivation (rec {
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.

@ -185,7 +185,7 @@ stdenv.mkDerivation (rec {
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.

@ -1,236 +0,0 @@
{ stdenv, pkgsBuildTarget, targetPackages
# build-tools
, bootPkgs
, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx
, bash
, libiconv ? null, ncurses
, # GHC can be built with system libffi or a bundled one.
libffi ? null
, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS
, # LLVM is conceptually a run-time-only depedendency, but for
# non-x86, we need LLVM to bootstrap later stages, so it becomes a
# build-time dependency too.
buildLlvmPackages, llvmPackages
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
, # Whetherto build terminfo.
enableTerminfo ? !stdenv.targetPlatform.isWindows
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
(if useLLVM then "perf-cross" else "perf-cross-ncg")
, # Whether to disable the large address space allocator
# necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
}:
assert !enableIntegerSimple -> gmp != null;
let
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
inherit (bootPkgs) ghc;
# TODO(@Ericson2314) Make unconditional
targetPrefix = stdenv.lib.optionalString
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";
buildMK = ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
endif
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
CrossCompilePrefix = ${targetPrefix}
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC
GhcRtsHcOpts += -fPIC
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
EXTRA_CC_OPTS += -std=gnu99
'';
# Splicer will pull out correct variations
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
toolsForTarget = [
pkgsBuildTarget.targetPackages.stdenv.cc
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
targetCC = builtins.head toolsForTarget;
# ld.gold is disabled for musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
# see #84670 and #49071 for more background.
useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;
in
stdenv.mkDerivation (rec {
version = "8.8.1";
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "06kj4fhvijinjafiy4s873n60qly323rdlz9bmc79nhlp3cq72lh";
};
enableParallelBuilding = true;
outputs = [ "out" "doc" ];
postPatch = "patchShebangs .";
# GHC is a bit confused on its cross terminology.
preConfigure = ''
for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
export "''${env#TARGET_}=''${!env}"
done
# GHC is a bit confused on its cross terminology, as these would normally be
# the *host* tools.
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
echo "patching llvm-targets for musl targets..."
echo "Cloning these existing '*-linux-gnu*' targets:"
grep linux-gnu llvm-targets | sed 's/^/ /'
echo "(go go gadget sed)"
sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
echo "llvm-targets now contains these '*-linux-musl*' targets:"
grep linux-musl llvm-targets | sed 's/^/ /'
echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
# (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
for x in configure aclocal.m4; do
substituteInPlace $x \
--replace '*-android*|*-gnueabi*)' \
'*-android*|*-gnueabi*|*-musleabi*)'
done
'';
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ]
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
# `--with` flags for libraries needed for RTS linker
configureFlags = [
"--datadir=$doc/share/doc/ghc"
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optionals (libffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetPackages.libffi.dev}/include" "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
] ++ stdenv.lib.optionals useLdGold [
"CFLAGS=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
dontAddExtraLibs = true;
nativeBuildInputs = [
perl autoconf automake m4 python3 sphinx
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
];
# For building runtime libs
depsBuildTarget = toolsForTarget;
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
checkTarget = "test";
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
# Patch scripts to include "readelf" and "cat" in $PATH.
for i in "$out/bin/"*; do
test ! -h $i || continue
egrep --quiet '^#!' <(head -n 1 $i) || continue
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
done
'';
passthru = {
inherit bootPkgs targetPrefix;
inherit llvmPackages;
inherit enableShared;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
};
meta = {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
inherit (ghc.meta) license platforms;
};
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
dontStrip = true;
dontPatchELF = true;
noAuditTmpdir = true;
})

@ -73,7 +73,7 @@ let
'';
# Splicer will pull out correct variations
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
++ [libffi]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
@ -160,10 +160,10 @@ stdenv.mkDerivation (rec {
"--with-system-libffi"
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include"
"--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
@ -176,7 +176,7 @@ stdenv.mkDerivation (rec {
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.

@ -176,7 +176,7 @@ stdenv.mkDerivation (rec {
"--disable-large-address-space"
];
# Make sure we never relax`$PATH` and hooks support for compatability.
# Make sure we never relax`$PATH` and hooks support for compatibility.
strictDeps = true;
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.

@ -45,6 +45,12 @@ self: super: {
# Needs older QuickCheck version
attoparsec-varword = dontCheck super.attoparsec-varword;
# http://bugs.darcs.net/issue2642
darcs = doJailbreak (appendPatches super.darcs [
./patches/darcs-setup.patch
./patches/darcs-2.14.2-Compile-against-GHC-8.8.patch
]);
# Tests are failing
# https://github.com/bos/statistics/issues/123
statistics = dontCheck super.statistics;
@ -592,6 +598,12 @@ self: super: {
elm-server = markBroken super.elm-server;
elm-yesod = markBroken super.elm-yesod;
# https://github.com/Euterpea/Euterpea2/issues/40
Euterpea = appendPatch super.Euterpea (pkgs.fetchpatch {
url = "https://github.com/Euterpea/Euterpea2/pull/38.patch";
sha256 = "13g462qmj8c7if797gnyvf8h0cddmm3xy0pjldw48w8f8sr4qsj0";
});
# https://github.com/athanclark/sets/issues/2
sets = dontCheck super.sets;
@ -1055,13 +1067,9 @@ self: super: {
# https://github.com/haskell-hvr/hgettext/issues/14
hgettext = doJailbreak super.hgettext;
# 2.23.0 supports GHC 8.x and up
haddock = super.haddock_2_22_0;
# haddock-api-2.22.0: Break out of “QuickCheck ==2.11.*, hspec >=2.4.4 && <2.6”
haddock-api = dontHaddock (doJailbreak (super.haddock-api_2_22_0));
# The test suite is broken. Break out of "base-compat >=0.9.3 && <0.10, hspec >=2.4.4 && <2.5".
haddock-library = doJailbreak (dontCheck super.haddock-library);
haddock-library_1_9_0 = doJailbreak (dontCheck super.haddock-library_1_9_0);
# Generate shell completion.
cabal2nix = generateOptparseApplicativeCompletion "cabal2nix" super.cabal2nix;
@ -1499,10 +1507,16 @@ self: super: {
polysemy = self.polysemy_1_3_0_0;
};
# Fixed at head, but hasn't cut a release in awhile.
darcs = doJailbreak super.darcs;
# Test suite requires running a database server. Testing is done upstream.
hasql-pool = dontCheck super.hasql-pool;
# This bumps optparse-applicative to <0.16 in the cabal file, as otherwise
# the version bounds are not satisfied. This can be removed if the PR at
# https://github.com/ananthakumaran/webify/pull/27 is merged and a new
# release of webify is published.
webify = appendPatch super.webify (pkgs.fetchpatch {
url = "https://github.com/ananthakumaran/webify/pull/27/commits/6d653e7bdc1ffda75ead46851b5db45e87cb2aa0.patch";
sha256 = "sha256:0xbfhzhzg94b4r5qy5dg1c40liswwpqarrc2chcwgfbfnrmwkfc2";
});
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super

@ -42,6 +42,9 @@ self: super: {
unix = null;
xhtml = null;
# Deviate from Stackage LTS-15.x to fix the build.
haddock-library = self.haddock-library_1_9_0;
# Jailbreak to fix the build.
async = doJailbreak super.async;
ChasingBottoms = doJailbreak super.ChasingBottoms;
@ -60,7 +63,6 @@ self: super: {
zlib = doJailbreak super.zlib;
# Use the latest version to fix the build.
microlens-th = self.microlens-th_0_4_3_5;
optics-core = self.optics-core_0_3;
repline = self.repline_0_3_0_0;
ghc-lib-parser-ex = self.ghc-lib-parser-ex_8_10_0_4;
@ -94,4 +96,6 @@ self: super: {
sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f";
});
# Only 0.8 is compatible with ghc 8.10 https://hackage.haskell.org/package/apply-refact/changelog
apply-refact = super.apply-refact_0_8_0_0;
}

@ -91,4 +91,6 @@ self: super: {
# ghc versions prior to 8.8.x needs additional dependency to compile successfully.
ghc-lib-parser-ex = addBuildDepend super.ghc-lib-parser-ex self.ghc-lib-parser;
# Only 0.6 is compatible with ghc 8.6 https://hackage.haskell.org/package/apply-refact/changelog
apply-refact = super.apply-refact_0_6_0_0;
}

@ -41,6 +41,10 @@ self: super: {
unix = null;
xhtml = null;
# GHC 8.8.x can build haddock version 2.23.*
haddock = self.haddock_2_23_1;
haddock-api = self.haddock-api_2_23_1;
# These builds need Cabal 3.2.x.
cabal2spec = super.cabal2spec.override { Cabal = self.Cabal_3_2_0_0; };
cabal-install = super.cabal-install.overrideScope (self: super: { Cabal = self.Cabal_3_2_0_0; });
@ -96,4 +100,6 @@ self: super: {
# of issues with Cabal 3.x.
darcs = dontDistribute super.darcs;
# Only 0.7 is compatible with ghc 8.7 https://hackage.haskell.org/package/apply-refact/changelog
apply-refact = super.apply-refact_0_7_0_0;
}

@ -72,7 +72,7 @@ default-package-overrides:
# gi-gdkx11-4.x requires gtk-4.x, which is still under development and
# not yet available in Nixpkgs
- gi-gdkx11 < 4
# LTS Haskell 15.8
# LTS Haskell 15.9
- abstract-deque ==0.3
- abstract-par ==0.3.3
- AC-Angle ==1.0
@ -309,7 +309,7 @@ default-package-overrides:
- bitarray ==0.0.1.1
- bits ==0.5.2
- bitset-word8 ==0.1.1.1
- bits-extra ==0.0.1.5
- bits-extra ==0.0.2.0
- bitvec ==1.0.3.0
- blake2 ==0.3.0
- blanks ==0.3.0
@ -346,7 +346,7 @@ default-package-overrides:
- buffer-builder ==0.2.4.7
- buffer-pipe ==0.0
- bugsnag-hs ==0.1.0.0
- butcher ==1.3.3.0
- butcher ==1.3.3.1
- bv ==0.5
- bv-little ==1.1.1
- byteable ==0.1.1
@ -408,7 +408,7 @@ default-package-overrides:
- chimera ==0.3.1.0
- choice ==0.2.2
- chronologique ==0.3.1.1
- chronos ==1.1
- chronos ==1.1.1
- chronos-bench ==0.2.0.2
- chunked-data ==0.3.1
- cipher-aes ==0.2.11
@ -823,20 +823,20 @@ default-package-overrides:
- genvalidity-scientific ==0.2.1.1
- genvalidity-text ==0.7.0.2
- genvalidity-time ==0.3.0.0
- genvalidity-typed-uuid ==0.0.0.1
- genvalidity-typed-uuid ==0.0.0.2
- genvalidity-unordered-containers ==0.3.0.1
- genvalidity-uuid ==0.1.0.3
- genvalidity-uuid ==0.1.0.4
- genvalidity-vector ==0.3.0.1
- geojson ==4.0.2
- getopt-generics ==0.13.0.4
- ghc-compact ==0.1.0.0
- ghc-core ==0.5.6
- ghc-exactprint ==0.6.2
- ghcid ==0.8.5
- ghcid ==0.8.6
- ghci-hexcalc ==0.1.1.0
- ghcjs-codemirror ==0.0.0.2
- ghc-lib ==8.8.3.20200224
- ghc-lib-parser ==8.8.3.20200224
- ghc-lib ==8.8.3.20200412.1
- ghc-lib-parser ==8.8.3.20200412.1
- ghc-lib-parser-ex ==8.8.5.8
- ghc-paths ==0.1.0.12
- ghc-prof ==1.4.1.7
@ -987,7 +987,7 @@ default-package-overrides:
- hsc2hs ==0.68.7
- hscolour ==1.24.4
- hsdns ==1.8
- hsebaysdk ==0.4.0.0
- hsebaysdk ==0.4.1.0
- hsemail ==2.2.0
- hset ==2.2.0
- hs-functors ==0.1.6.0
@ -1058,36 +1058,36 @@ default-package-overrides:
- hunit-dejafu ==2.0.0.1
- hvect ==0.4.0.0
- hvega ==0.5.0.0
- hw-balancedparens ==0.3.0.5
- hw-bits ==0.7.1.5
- hw-conduit ==0.2.0.6
- hw-conduit-merges ==0.2.0.0
- hw-diagnostics ==0.0.0.7
- hw-dsv ==0.4.0
- hw-balancedparens ==0.3.1.0
- hw-bits ==0.7.2.0
- hw-conduit ==0.2.1.0
- hw-conduit-merges ==0.2.1.0
- hw-diagnostics ==0.0.1.0
- hw-dsv ==0.4.1.0
- hweblib ==0.6.3
- hw-eliasfano ==0.1.1.1
- hw-excess ==0.2.2.3
- hw-fingertree ==0.1.1.1
- hw-fingertree-strict ==0.1.1.3
- hw-hedgehog ==0.1.0.5
- hw-hspec-hedgehog ==0.1.0.9
- hw-int ==0.0.0.4
- hw-ip ==2.4.1.0
- hw-json ==1.3.1.1
- hw-json-simd ==0.1.0.4
- hw-json-simple-cursor ==0.1.0.2
- hw-json-standard-cursor ==0.2.1.3
- hw-mquery ==0.2.0.2
- hw-packed-vector ==0.2.0.1
- hw-parser ==0.1.0.2
- hw-prim ==0.6.2.40
- hw-rankselect ==0.13.3.2
- hw-rankselect-base ==0.3.3.0
- hw-simd ==0.1.1.5
- hw-streams ==0.0.0.12
- hw-eliasfano ==0.1.2.0
- hw-excess ==0.2.3.0
- hw-fingertree ==0.1.2.0
- hw-fingertree-strict ==0.1.2.0
- hw-hedgehog ==0.1.1.0
- hw-hspec-hedgehog ==0.1.1.0
- hw-int ==0.0.1.0
- hw-ip ==2.4.2.0
- hw-json ==1.3.2.0
- hw-json-simd ==0.1.1.0
- hw-json-simple-cursor ==0.1.1.0
- hw-json-standard-cursor ==0.2.2.0
- hw-mquery ==0.2.1.0
- hw-packed-vector ==0.2.1.0
- hw-parser ==0.1.1.0
- hw-prim ==0.6.3.0
- hw-rankselect ==0.13.4.0
- hw-rankselect-base ==0.3.4.0
- hw-simd ==0.1.2.0
- hw-streams ==0.0.1.0
- hw-string-parse ==0.0.0.4
- hw-succinct ==0.1.0.1
- hw-xml ==0.5.0.0
- hw-xml ==0.5.1.0
- hxt ==9.3.1.18
- hxt-charproperties ==9.4.0.0
- hxt-css ==0.1.0.3
@ -1123,7 +1123,7 @@ default-package-overrides:
- inj ==1.0
- inline-c ==0.9.1.0
- inline-c-cpp ==0.4.0.2
- insert-ordered-containers ==0.2.3
- insert-ordered-containers ==0.2.3.1
- inspection-testing ==0.4.2.4
- instance-control ==0.1.2.0
- int-cast ==0.2.0.0
@ -1318,7 +1318,7 @@ default-package-overrides:
- microlens-mtl ==0.2.0.1
- microlens-platform ==0.4.1
- microlens-process ==0.2.0.1
- microlens-th ==0.4.3.4
- microlens-th ==0.4.3.5
- microspec ==0.2.1.3
- microstache ==1.0.1.1
- midair ==0.2.0.1
@ -1658,7 +1658,7 @@ default-package-overrides:
- qm-interpolated-string ==0.3.0.0
- qrcode-core ==0.9.2
- qrcode-juicypixels ==0.8.0
- quadratic-irrational ==0.1.0
- quadratic-irrational ==0.1.1
- QuasiText ==0.1.2.6
- QuickCheck ==2.13.2
- quickcheck-arbitrary-adt ==0.3.1.0
@ -1719,7 +1719,7 @@ default-package-overrides:
- regex-compat ==0.95.2.0
- regex-compat-tdfa ==0.95.1.4
- regex-pcre ==0.95.0.0
- regex-pcre-builtin ==0.95.1.1.8.43
- regex-pcre-builtin ==0.95.1.2.8.43
- regex-posix ==0.96.0.0
- regex-tdfa ==1.3.1.0
- regex-with-pcre ==1.1.0.0
@ -1761,7 +1761,7 @@ default-package-overrides:
- runmemo ==1.0.0.1
- run-st ==0.1.1.0
- safe ==0.3.18
- safecopy ==0.10.2
- safecopy ==0.10.3
- safe-decimal ==0.2.0.0
- safe-exceptions ==0.1.7.0
- safe-exceptions-checked ==0.1.0
@ -1787,7 +1787,7 @@ default-package-overrides:
- scientific ==0.3.6.2
- scotty ==0.11.5
- scrypt ==0.5.0
- sdl2 ==2.5.1.0
- sdl2 ==2.5.2.0
- sdl2-gfx ==0.2
- sdl2-image ==2.0.0
- sdl2-mixer ==1.1.0
@ -1825,7 +1825,7 @@ default-package-overrides:
- servant-client-core ==0.16
- servant-conduit ==0.15
- servant-docs ==0.11.4
- servant-elm ==0.7.1
- servant-elm ==0.7.2
- servant-foreign ==0.15
- servant-js ==0.9.4.1
- servant-JuicyPixels ==0.3.0.5
@ -2001,7 +2001,7 @@ default-package-overrides:
- tasty-dejafu ==2.0.0.1
- tasty-discover ==4.2.1
- tasty-expected-failure ==0.11.1.2
- tasty-golden ==2.3.3
- tasty-golden ==2.3.3.1
- tasty-hedgehog ==1.0.0.2
- tasty-hspec ==1.1.5.1
- tasty-hunit ==0.10.0.2
@ -2063,8 +2063,8 @@ default-package-overrides:
- th-expand-syns ==0.4.6.0
- th-extras ==0.0.0.4
- th-lift ==0.8.1
- th-lift-instances ==0.1.15
- th-orphans ==0.13.9
- th-lift-instances ==0.1.16
- th-orphans ==0.13.10
- th-printf ==0.7
- thread-hierarchy ==0.3.0.1
- thread-local-storage ==0.2
@ -2078,7 +2078,7 @@ default-package-overrides:
- th-strict-compat ==0.1.0.1
- th-test-utils ==1.0.1
- thyme ==0.3.5.5
- tidal ==1.4.8
- tidal ==1.4.9
- tile ==0.3.0.0
- time-compat ==1.9.3
- timeit ==2.0
@ -2358,6 +2358,9 @@ extra-packages:
- ansi-terminal == 0.10.3 # required by cabal-plan, and policeman in ghc-8.8.x
- aeson-pretty < 0.8 # required by elm compiler
- apply-refact < 0.4 # newer versions don't work with GHC 8.0.x
- apply-refact == 0.6.0.0 # works with GHC 8.6.x https://hackage.haskell.org/package/apply-refact/changelog
- apply-refact == 0.7.0.0 # works with GHC 8.8.x https://hackage.haskell.org/package/apply-refact/changelog
- apply-refact == 0.8.0.0 # works with GHC 8.10.x https://hackage.haskell.org/package/apply-refact/changelog
- binary > 0.7 && < 0.8 # keep a 7.x major release around for older compilers
- binary > 0.8 && < 0.9 # keep a 8.x major release around for older compilers
- blank-canvas < 0.6.3 # more recent versions depend on base-compat-batteries == 0.10.* but we're on base-compat-0.9.*
@ -2376,7 +2379,8 @@ extra-packages:
- ghc-tcplugins-extra ==0.3.2 # required for polysemy-plugin 0.2.5.0
- gloss < 1.9.3 # new versions don't compile with GHC 7.8.x
- haddock == 2.22.* # required on GHC 8.0.x
- haddock-api == 2.22.* # required on GHC 7.8.x
- haddock == 2.23.* # required on GHC < 8.10.x
- haddock-api == 2.23.* # required on GHC < 8.10.x
- haddock-library ==1.7.* # required by stylish-cabal-0.5.0.0
- happy <1.19.6 # newer versions break Agda
- happy == 1.19.9 # for purescript
@ -3110,7 +3114,6 @@ broken-packages:
- binary-protocol-zmq
- binary-search
- binary-streams
- binary-strict
- binary-typed
- bind-marshal
- BinderAnn
@ -3405,6 +3408,7 @@ broken-packages:
- cal3d
- cal3d-examples
- cal3d-opengl
- calamity
- calc
- calculator
- caldims
@ -4510,7 +4514,6 @@ broken-packages:
- eths-rlp
- euphoria
- eurofxref
- Euterpea
- eve
- eve-cli
- event
@ -7492,6 +7495,9 @@ broken-packages:
- mp
- mpdmate
- mpi-hs
- mpi-hs-binary
- mpi-hs-cereal
- mpi-hs-store
- mpppc
- mpretty
- mpris
@ -9786,12 +9792,6 @@ broken-packages:
- tempus
- tensor
- tensor-safe
- tensorflow
- tensorflow-core-ops
- tensorflow-logging
- tensorflow-opgen
- tensorflow-ops
- tensorflow-proto
- termbox
- termbox-banana
- termbox-bindings
@ -9828,7 +9828,6 @@ broken-packages:
- text-and-plots
- text-ansi
- text-containers
- text-format
- text-format-heavy
- text-generic-pretty
- text-icu-normalized
@ -10469,7 +10468,6 @@ broken-packages:
- webdriver-w3c
- WeberLogic
- webfinger-client
- webify
- webkit-javascriptcore
- Webrexp
- webserver

File diff suppressed because it is too large Load Diff

@ -86,6 +86,11 @@ rec {
future.
Instead of jailbreaking, you can patch the cabal file.
Note that jailbreaking at this time, doesn't lift bounds on
conditional branches.
https://github.com/peti/jailbreak-cabal/issues/7 has further details.
*/
doJailbreak = drv: overrideCabal drv (drv: { jailbreak = true; });

@ -0,0 +1,333 @@
From 2490fa65eeba52699a7c0e303aa5cb9b78c2b1cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= <mail@nh2.me>
Date: Fri, 17 Apr 2020 20:49:23 +0200
Subject: [PATCH] Compile against GHC 8.8
---
Setup.hs | 15 ---------------
src/Darcs/Patch/Depends.hs | 2 +-
src/Darcs/Patch/Match.hs | 12 ++++++------
src/Darcs/Patch/PatchInfoAnd.hs | 2 +-
src/Darcs/Patch/Prim/V1/Apply.hs | 6 +++---
src/Darcs/Patch/Prim/V1/Commute.hs | 1 +
src/Darcs/Patch/ReadMonads.hs | 1 +
src/Darcs/Patch/V1/Commute.hs | 1 +
src/Darcs/Repository/Diff.hs | 2 +-
src/Darcs/Repository/Match.hs | 2 +-
src/Darcs/Util/Tree/Monad.hs | 4 ++--
12 files changed, 30 insertions(+), 42 deletions(-)
diff --git a/Setup.hs b/Setup.hs
index f5cc3e8..05caac4 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -75,21 +75,6 @@
postInst = \ _ flags pkg lbi ->
installManpage pkg lbi (fromFlag $ installVerbosity flags) NoCopyDest,
- sDistHook = \ pkg lbi hooks flags -> do
- let pkgVer = packageVersion pkg
- verb = fromFlag $ sDistVerbosity flags
- x <- versionPatches verb pkgVer
- y <- context verb
- rewriteFileEx silent "release/distributed-version" $ show x
- rewriteFileEx silent "release/distributed-context" $ show y
- putStrLn "about to hand over"
- let pkg' = pkg { library = sanity (library pkg) }
- sanity (Just lib) = Just $ lib { libBuildInfo = sanity' $ libBuildInfo lib }
- sanity _ = error "eh"
- sanity' bi = bi { otherModules = [ m | m <- otherModules bi, toFilePath m /= "Version" ] }
-
- sDistHook simpleUserHooks pkg' lbi hooks flags
- ,
postConf = \_ _ _ _ -> return () --- Usually this checked for external C
--- dependencies, but we already have performed such
--- check in the confHook
--- a/darcs.cabal 1970-01-01 01:00:01.000000000 +0100
+++ b/darcs.cabal 2020-04-18 10:26:07.605129733 +0200
@@ -1,6 +1,5 @@
Name: darcs
version: 2.14.2
-x-revision: 1
License: GPL-2
License-file: COPYING
Author: David Roundy <droundy@darcs.net>, <darcs-devel@darcs.net>
@@ -75,7 +74,7 @@
description: Use libcurl for HTTP support.
-- in future this could extend to any other external libraries,
--- e.g. libiconv
+-- e.g. libiconv
flag pkgconfig
description: Use pkgconfig to configure libcurl
default: False
@@ -113,7 +112,7 @@
-- ----------------------------------------------------------------------
custom-setup
- setup-depends: base >= 4.9 && < 4.13,
+ setup-depends: base >= 4.9 && <5,
Cabal >= 1.24,
process >= 1.2.3.0 && < 1.7,
filepath >= 1.4.1 && < 1.5.0.0,
@@ -381,7 +380,7 @@
else
build-depends: unix >= 2.7.1.0 && < 2.8
- build-depends: base >= 4.9 && < 4.13,
+ build-depends: base >= 4.9 && <5,
stm >= 2.1 && < 2.6,
binary >= 0.5 && < 0.10,
containers >= 0.5.6.2 && < 0.7,
@@ -402,19 +401,19 @@
tar >= 0.5 && < 0.6,
data-ordlist == 0.4.*,
attoparsec >= 0.13.0.1 && < 0.14,
- zip-archive >= 0.3 && < 0.5,
+ zip-archive >= 0.3 && <1,
async >= 2.0.2 && < 2.3,
- sandi >= 0.4 && < 0.6,
+ sandi >= 0.4 && <1,
unix-compat >= 0.4.2 && < 0.6,
bytestring >= 0.10.6 && < 0.11,
old-time >= 1.1.0.3 && < 1.2,
time >= 1.5.0.1 && < 1.10,
- text >= 1.2.1.3 && < 1.3,
+ text >= 1.2.1.3 && <2,
directory >= 1.2.6.2 && < 1.4,
process >= 1.2.3.0 && < 1.7,
array >= 0.5.1.0 && < 0.6,
random >= 1.1 && < 1.2,
- hashable >= 1.2.3.3 && < 1.3,
+ hashable >= 1.2.3.3 && <2,
mmap >= 0.5.9 && < 0.6,
zlib >= 0.6.1.2 && < 0.7.0.0,
network-uri == 2.6.*,
@@ -443,7 +442,7 @@
-- The terminfo package cannot be built on Windows.
if flag(terminfo) && !os(windows)
- build-depends: terminfo >= 0.4.0.2 && < 0.5
+ build-depends: terminfo >= 0.4.0.2 && <1
cpp-options: -DHAVE_TERMINFO
default-extensions:
@@ -500,7 +499,7 @@
cc-options: -D_REENTRANT
build-depends: darcs,
- base >= 4.9 && < 4.13
+ base >= 4.9 && <5
-- ----------------------------------------------------------------------
-- unit test driver
@@ -518,7 +517,7 @@
build-depends: Win32 >= 2.3.1 && < 2.4
build-depends: darcs,
- base >= 4.9 && < 4.13,
+ base >= 4.9 && <5,
array >= 0.5.1.0 && < 0.6,
bytestring >= 0.10.6 && < 0.11,
cmdargs >= 0.10.10 && < 0.11,
@@ -527,15 +526,15 @@
mtl >= 2.2.1 && < 2.3,
shelly >= 1.6.8 && < 1.9,
split >= 0.2.2 && < 0.3,
- text >= 1.2.1.3 && < 1.3,
+ text >= 1.2.1.3 && <2,
directory >= 1.2.6.2 && < 1.4,
FindBin >= 0.0.5 && < 0.1,
- QuickCheck >= 2.8.2 && < 2.13,
+ QuickCheck >= 2.8.2 && <3,
HUnit >= 1.3 && < 1.7,
test-framework >= 0.8.1.1 && < 0.9,
test-framework-hunit >= 0.3.0.2 && < 0.4,
test-framework-quickcheck2 >= 0.3.0.3 && < 0.4,
- zip-archive >= 0.3 && < 0.5
+ zip-archive >= 0.3 && <1
-- https://github.com/yesodweb/Shelly.hs/issues/177
if os(windows)
diff --git a/src/Darcs/Patch/Depends.hs b/src/Darcs/Patch/Depends.hs
index 8531294..a4c71cb 100644
--- a/src/Darcs/Patch/Depends.hs
+++ b/src/Darcs/Patch/Depends.hs
@@ -251,7 +251,7 @@ splitOnTag _ (PatchSet NilRL NilRL) = Nothing
unwrapOneTagged :: (Monad m) => PatchSet rt p wX wY -> m (PatchSet rt p wX wY)
unwrapOneTagged (PatchSet (ts :<: Tagged t _ tps) ps) =
return $ PatchSet ts (tps :<: t +<+ ps)
-unwrapOneTagged _ = fail "called unwrapOneTagged with no Tagged's in the set"
+unwrapOneTagged _ = error "called unwrapOneTagged with no Tagged's in the set"
-- | @getUncovered ps@ returns the 'PatchInfo' for all the patches in
-- @ps@ that are not depended on by anything else *through explicit
diff --git a/src/Darcs/Patch/Match.hs b/src/Darcs/Patch/Match.hs
index aba6c7a..2b6f53a 100644
--- a/src/Darcs/Patch/Match.hs
+++ b/src/Darcs/Patch/Match.hs
@@ -421,7 +421,7 @@ getNonrangeMatchS fs repo =
Just m -> if nonrangeMatcherIsTag fs
then getTagS m repo
else getMatcherS Exclusive m repo
- Nothing -> fail "Pattern not specified in getNonrangeMatch."
+ Nothing -> error "Pattern not specified in getNonrangeMatch."
-- | @firstMatch fs@ tells whether @fs@ implies a "first match", that
-- is if we match against patches from a point in the past on, rather
@@ -441,7 +441,7 @@ getFirstMatchS fs repo =
Just (_,b) -> unpullLastN repo b -- b is chronologically earlier than a
Nothing ->
case firstMatcher fs of
- Nothing -> fail "Pattern not specified in getFirstMatchS."
+ Nothing -> error "Pattern not specified in getFirstMatchS."
Just m -> if firstMatcherIsTag fs
then getTagS m repo
else getMatcherS Inclusive m repo
@@ -462,7 +462,7 @@ checkMatchSyntax :: [MatchFlag] -> IO ()
checkMatchSyntax opts =
case getMatchPattern opts of
Nothing -> return ()
- Just p -> either fail (const $ return ()) (parseMatch p::Either String (MatchFun rt DummyPatch))
+ Just p -> either error (const $ return ()) (parseMatch p::Either String (MatchFun rt DummyPatch))
getMatchPattern :: [MatchFlag] -> Maybe String
getMatchPattern [] = Nothing
@@ -718,7 +718,7 @@ getMatcherS :: (ApplyMonad (ApplyState p) m, Matchable p) =>
getMatcherS ioe m repo =
if matchExists m repo
then applyInvToMatcher ioe m repo
- else fail $ "Couldn't match pattern "++ show m
+ else error $ "Couldn't match pattern "++ show m
getTagS :: (ApplyMonad (ApplyState p) m, MonadProgress m, Matchable p) =>
Matcher rt p -> PatchSet rt p Origin wX -> m ()
diff --git a/src/Darcs/Patch/PatchInfoAnd.hs b/src/Darcs/Patch/PatchInfoAnd.hs
index 2da7ec8..1147410 100644
--- a/src/Darcs/Patch/PatchInfoAnd.hs
+++ b/src/Darcs/Patch/PatchInfoAnd.hs
@@ -167,7 +167,7 @@ conscientiously er (PIAP pinf hp) =
-- | @hopefullyM@ is a version of @hopefully@ which calls @fail@ in a
-- monad instead of erroring.
-hopefullyM :: Monad m => PatchInfoAnd rt p wA wB -> m (WrappedNamed rt p wA wB)
+hopefullyM :: MonadFail m => PatchInfoAnd rt p wA wB -> m (WrappedNamed rt p wA wB)
hopefullyM (PIAP pinf hp) = case hopefully2either hp of
Right p -> return p
Left e -> fail $ renderString
diff --git a/src/Darcs/Patch/Prim/V1/Apply.hs b/src/Darcs/Patch/Prim/V1/Apply.hs
index bea7e41..7984d21 100644
--- a/src/Darcs/Patch/Prim/V1/Apply.hs
+++ b/src/Darcs/Patch/Prim/V1/Apply.hs
@@ -41,13 +41,13 @@ instance Apply Prim where
apply (FP f (TokReplace t o n)) = mModifyFilePS f doreplace
where doreplace fc =
case tryTokReplace t (BC.pack o) (BC.pack n) fc of
- Nothing -> fail $ "replace patch to " ++ fn2fp f
+ Nothing -> error $ "replace patch to " ++ fn2fp f
++ " couldn't apply."
Just fc' -> return fc'
apply (FP f (Binary o n)) = mModifyFilePS f doapply
where doapply oldf = if o == oldf
then return n
- else fail $ "binary patch to " ++ fn2fp f
+ else error $ "binary patch to " ++ fn2fp f
++ " couldn't apply."
apply (DP d AddDir) = mCreateDirectory d
apply (DP d RmDir) = mRemoveDirectory d
@@ -115,7 +115,7 @@ applyHunk f h fc =
case applyHunkLines h fc of
Right fc' -> return fc'
Left msg ->
- fail $
+ error $
"### Error applying:\n" ++ renderHunk h ++
"\n### to file " ++ fn2fp f ++ ":\n" ++ BC.unpack fc ++
"### Reason: " ++ msg
diff --git a/src/Darcs/Patch/Prim/V1/Commute.hs b/src/Darcs/Patch/Prim/V1/Commute.hs
index 7639dbd..e1432e6 100644
--- a/src/Darcs/Patch/Prim/V1/Commute.hs
+++ b/src/Darcs/Patch/Prim/V1/Commute.hs
@@ -58,6 +58,7 @@ instance Monad Perhaps where
Failed >>= _ = Failed
Unknown >>= _ = Unknown
return = Succeeded
+instance MonadFail Perhaps where
fail _ = Unknown
instance Alternative Perhaps where
diff --git a/src/Darcs/Patch/ReadMonads.hs b/src/Darcs/Patch/ReadMonads.hs
index 62a4f81..e1cb149 100644
--- a/src/Darcs/Patch/ReadMonads.hs
+++ b/src/Darcs/Patch/ReadMonads.hs
@@ -237,6 +237,7 @@ failSM _ = SM (\_ -> Nothing)
instance Monad SM where
(>>=) = bindSM
return = returnSM
+instance MonadFail SM where
fail = failSM
instance ParserM SM where
diff --git a/src/Darcs/Patch/V1/Commute.hs b/src/Darcs/Patch/V1/Commute.hs
index 0bb41a3..c6c3382 100644
--- a/src/Darcs/Patch/V1/Commute.hs
+++ b/src/Darcs/Patch/V1/Commute.hs
@@ -93,6 +93,7 @@ instance Monad Perhaps where
Failed >>= _ = Failed
Unknown >>= _ = Unknown
return = Succeeded
+instance MonadFail Perhaps where
fail _ = Unknown
instance Alternative Perhaps where
diff --git a/src/Darcs/Repository/Diff.hs b/src/Darcs/Repository/Diff.hs
index 8078d49..e0e2341 100644
--- a/src/Darcs/Repository/Diff.hs
+++ b/src/Darcs/Repository/Diff.hs
@@ -138,7 +138,7 @@ treeDiff da ft t1 t2 = do
do rmDirP <- diff p (Removed subtree)
addFileP <- diff p (Changed (File emptyBlob) b')
return $ joinGap (+>+) rmDirP addFileP
- diff p _ = fail $ "Missing case at path " ++ show p
+ diff p _ = error $ "Missing case at path " ++ show p
text_diff p a b
| BL.null a && BL.null b = emptyGap NilFL
diff --git a/src/Darcs/Repository/Match.hs b/src/Darcs/Repository/Match.hs
index 08c9f13..f33cabe 100644
--- a/src/Darcs/Repository/Match.hs
+++ b/src/Darcs/Repository/Match.hs
@@ -60,7 +60,7 @@ getNonrangeMatch :: (ApplyMonad (ApplyState p) DefaultIO, IsRepoType rt, RepoPat
getNonrangeMatch r = withRecordedMatch r . getMatch where
getMatch fs = case hasIndexRange fs of
Just (n, m) | n == m -> applyNInv (n-1)
- | otherwise -> fail "Index range is not allowed for this command."
+ | otherwise -> error "Index range is not allowed for this command."
_ -> getNonrangeMatchS fs
getOnePatchset :: (IsRepoType rt, RepoPatch p)
diff --git a/src/Darcs/Util/Tree/Monad.hs b/src/Darcs/Util/Tree/Monad.hs
index 0e01d9b..296fdc4 100644
--- a/src/Darcs/Util/Tree/Monad.hs
+++ b/src/Darcs/Util/Tree/Monad.hs
@@ -216,7 +216,7 @@ instance (Monad m) => TreeRO (TreeMonad m) where
t <- gets tree
let f = findFile t p'
case f of
- Nothing -> fail $ "No such file " ++ show p'
+ Nothing -> error $ "No such file " ++ show p'
Just x -> lift (readBlob x)
currentDirectory = ask
@@ -251,7 +251,7 @@ instance (Monad m) => TreeRW (TreeMonad m) where
let item = find tr from'
found_to = find tr to'
unless (isNothing found_to) $
- fail $ "Error renaming: destination " ++ show to ++ " exists."
+ error $ "Error renaming: destination " ++ show to ++ " exists."
unless (isNothing item) $ do
modifyItem from Nothing
modifyItem to item
--
2.23.1

@ -0,0 +1,120 @@
--- darcs-2.14.2/Setup.hs 2019-01-27 03:14:51.000000000 +1300
+++ darcs.net/Setup.hs 2019-10-18 02:41:57.000000000 +1300
@@ -11,7 +11,9 @@
, TestSuite(testBuildInfo)
, updatePackageDescription
, cppOptions, ccOptions
- , library, libBuildInfo, otherModules )
+ , library, libBuildInfo, otherModules
+ , ComponentName(CExeName)
+ )
import Distribution.Package
( packageVersion )
import Distribution.Version( Version )
@@ -21,24 +23,27 @@
import Distribution.Simple.Setup
(buildVerbosity, copyDest, copyVerbosity, fromFlag,
haddockVerbosity, installVerbosity, sDistVerbosity, replVerbosity )
-import Distribution.Simple.BuildPaths ( autogenModulesDir )
+import Distribution.Simple.BuildPaths ( autogenPackageModulesDir )
import Distribution.System
( OS(Windows), buildOS )
import Distribution.Simple.Utils
(copyFiles, createDirectoryIfMissingVerbose, rawSystemStdout,
- rewriteFile )
+ rewriteFileEx)
+import Distribution.Types.UnqualComponentName
import Distribution.Verbosity
- ( Verbosity )
+ ( Verbosity, silent )
import Distribution.Text
( display )
-import Control.Monad ( unless, void )
+import Control.Monad ( unless, when, void )
import System.Directory
( doesDirectoryExist, doesFileExist )
import System.IO
( openFile, IOMode(..) )
import System.Process (runProcess)
import Data.List( isInfixOf, lines )
+import qualified Data.Map as M
+import Data.Maybe ( isJust )
import System.FilePath ( (</>) )
import Foreign.Marshal.Utils ( with )
import Foreign.Storable ( peek )
@@ -75,8 +80,8 @@
verb = fromFlag $ sDistVerbosity flags
x <- versionPatches verb pkgVer
y <- context verb
- rewriteFile "release/distributed-version" $ show x
- rewriteFile "release/distributed-context" $ show y
+ rewriteFileEx silent "release/distributed-version" $ show x
+ rewriteFileEx silent "release/distributed-context" $ show y
putStrLn "about to hand over"
let pkg' = pkg { library = sanity (library pkg) }
sanity (Just lib) = Just $ lib { libBuildInfo = sanity' $ libBuildInfo lib }
@@ -105,8 +110,7 @@
littleEndian <- testEndianness
let args = ("-DPACKAGE_VERSION=" ++ show' version) :
[arg | (arg, True) <- -- include fst iff snd.
- [-- We have MAPI iff building on/for Windows.
- ("-DHAVE_MAPI", buildOS == Windows),
+ [
("-DLITTLEENDIAN", littleEndian),
("-DBIGENDIAN", not littleEndian)]]
bi = emptyBuildInfo { cppOptions = args, ccOptions = args }
@@ -133,20 +137,26 @@
-- man page
-- ---------------------------------------------------------------------
+hasDarcsExe :: LocalBuildInfo -> Bool
+hasDarcsExe = isJust . M.lookup darcsExe . componentNameMap where
+ darcsExe = CExeName (mkUnqualComponentName "darcs")
+
buildManpage :: LocalBuildInfo -> IO ()
-buildManpage lbi = do
- let darcs = buildDir lbi </> "darcs/darcs"
- manpage = buildDir lbi </> "darcs/darcs.1"
- manpageHandle <- openFile manpage WriteMode
- void $ runProcess darcs ["help","manpage"]
- Nothing Nothing Nothing (Just manpageHandle) Nothing
+buildManpage lbi =
+ when (hasDarcsExe lbi) $ do
+ let darcs = buildDir lbi </> "darcs/darcs"
+ manpage = buildDir lbi </> "darcs/darcs.1"
+ manpageHandle <- openFile manpage WriteMode
+ void $ runProcess darcs ["help","manpage"]
+ Nothing Nothing Nothing (Just manpageHandle) Nothing
-installManpage :: PackageDescription -> LocalBuildInfo
- -> Verbosity -> CopyDest -> IO ()
+installManpage :: PackageDescription -> LocalBuildInfo -> Verbosity -> CopyDest -> IO ()
installManpage pkg lbi verbosity copy =
- copyFiles verbosity
- (mandir (absoluteInstallDirs pkg lbi copy) </> "man1")
- [(buildDir lbi </> "darcs", "darcs.1")]
+ when (hasDarcsExe lbi) $
+ copyFiles
+ verbosity
+ (mandir (absoluteInstallDirs pkg lbi copy) </> "man1")
+ [(buildDir lbi </> "darcs", "darcs.1")]
-- ---------------------------------------------------------------------
-- version module
@@ -187,12 +197,13 @@
generateVersionModule :: Verbosity -> LocalBuildInfo
-> String -> String -> IO ()
generateVersionModule verbosity lbi version state = do
- let dir = autogenModulesDir lbi
+ let dir = autogenPackageModulesDir lbi
createDirectoryIfMissingVerbose verbosity True dir
ctx <- context verbosity
hash <- weakhash verbosity
- rewriteFile (dir </> "Version.hs") $ unlines
+ rewriteFileEx silent (dir </> "Version.hs") $ unlines
["module Version where"
+ ,"import Darcs.Prelude"
,"version, weakhash, context :: String"
,"version = \"" ++ version ++ " (" ++ state ++ ")\""
,"weakhash = " ++ case hash of

@ -18947,7 +18947,7 @@ in
dablin = callPackage ../applications/radio/dablin { };
darcs = haskell.lib.overrideCabal (haskell.lib.justStaticExecutables haskell.packages.ghc865.darcs) (drv: {
darcs = haskell.lib.overrideCabal (haskell.lib.justStaticExecutables haskellPackages.darcs) (drv: {
configureFlags = (stdenv.lib.remove "-flibrary" drv.configureFlags or []) ++ ["-f-library"];
});

@ -56,12 +56,6 @@ in {
buildLlvmPackages = buildPackages.llvmPackages_6;
llvmPackages = pkgs.llvmPackages_6;
};
ghc881 = callPackage ../development/compilers/ghc/8.8.1.nix {
bootPkgs = packages.ghc865Binary;
inherit (buildPackages.python3Packages) sphinx;
buildLlvmPackages = buildPackages.llvmPackages_7;
llvmPackages = pkgs.llvmPackages_7;
};
ghc882 = callPackage ../development/compilers/ghc/8.8.2.nix {
bootPkgs = packages.ghc865Binary;
inherit (buildPackages.python3Packages) sphinx;
@ -134,11 +128,6 @@ in {
ghc = bh.compiler.ghc865;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.6.x.nix { };
};
ghc881 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc881;
ghc = bh.compiler.ghc881;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.8.x.nix { };
};
ghc882 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc882;
ghc = bh.compiler.ghc882;

Loading…
Cancel
Save