summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorLuc Tielen <luc.tielen@kabisa.nl>2019-09-15 19:33:25 +0200
committerPeter Simons <simons@cryp.to>2019-09-18 19:36:58 +0200
commit9b2394519c194df17c3028caa92be7ba50cbb710 (patch)
tree0614d32c9d31addf455cef573950855b57a973fb /pkgs
parent8a0c213261a00a38ae7c902e4acc689200ab1775 (diff)
downloadnixpkgs-9b2394519c194df17c3028caa92be7ba50cbb710.tar
nixpkgs-9b2394519c194df17c3028caa92be7ba50cbb710.tar.gz
nixpkgs-9b2394519c194df17c3028caa92be7ba50cbb710.tar.bz2
nixpkgs-9b2394519c194df17c3028caa92be7ba50cbb710.tar.lz
nixpkgs-9b2394519c194df17c3028caa92be7ba50cbb710.tar.xz
nixpkgs-9b2394519c194df17c3028caa92be7ba50cbb710.tar.zst
nixpkgs-9b2394519c194df17c3028caa92be7ba50cbb710.zip
haskell.packages.ghc881.alex: apply temporary patch for ghc881
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix2
-rw-r--r--pkgs/development/haskell-modules/patches/alex-3.2.4-ghc8.8.x.patch27
2 files changed, 28 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index c4cca42309d..88557fba162 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -1005,7 +1005,7 @@ self: super: {
   spdx = dontCheck super.spdx;
 
   # The test suite does not know how to find the 'alex' binary.
-  alex = overrideCabal super.alex (drv: {
+  alex = overrideCabal (appendPatch super.alex ./patches/alex-3.2.4-ghc8.8.x.patch) (drv: {
     testSystemDepends = (drv.testSystemDepends or []) ++ [pkgs.which];
     preCheck = ''export PATH="$PWD/dist/build/alex:$PATH"'';
   });
diff --git a/pkgs/development/haskell-modules/patches/alex-3.2.4-ghc8.8.x.patch b/pkgs/development/haskell-modules/patches/alex-3.2.4-ghc8.8.x.patch
new file mode 100644
index 00000000000..47efdfda860
--- /dev/null
+++ b/pkgs/development/haskell-modules/patches/alex-3.2.4-ghc8.8.x.patch
@@ -0,0 +1,27 @@
+From deaae6eddef5186bfd0e42e2c3ced39e26afa4d6 Mon Sep 17 00:00:00 2001
+From: "Joseph C. Sible" <josephcsible@users.noreply.github.com>
+Date: Sat, 31 Aug 2019 21:19:37 -0400
+Subject: [PATCH] Remove fail from default_typeclass test
+
+This was added when we copied in StateT from MTL, but we don't actually
+use it. Since the MonadFail Proposal was finished in GHC 8.8.1, it now
+breaks compiling, so remove it.
+---
+ tests/default_typeclass.x | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/tests/default_typeclass.x b/tests/default_typeclass.x
+index fb06684..5491e28 100644
+--- a/tests/default_typeclass.x
++++ b/tests/default_typeclass.x
+@@ -285,7 +285,6 @@ instance (Monad m) => Monad (StateT s m) where
+     m >>= k  = StateT $ \s -> do
+         (a, s') <- runStateT m s
+         runStateT (k a) s'
+-    fail str = StateT $ \_ -> fail str
+ 
+ -- | Fetch the current value of the state within the monad.
+ get' :: (Monad m) => StateT s m s
+-- 
+2.16.1
+