summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-haskell/vector/files')
-rw-r--r--dev-haskell/vector/files/vector-0.12.3.1-disable-doctests.patch27
-rw-r--r--dev-haskell/vector/files/vector-0.12.3.1-fix-testdata-float.patch42
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-haskell/vector/files/vector-0.12.3.1-disable-doctests.patch b/dev-haskell/vector/files/vector-0.12.3.1-disable-doctests.patch
new file mode 100644
index 000000000000..1a04dd89c7f0
--- /dev/null
+++ b/dev-haskell/vector/files/vector-0.12.3.1-disable-doctests.patch
@@ -0,0 +1,27 @@
+From eb479f24b766425dd522ba01e0c298fc814c788d Mon Sep 17 00:00:00 2001
+From: hololeap <hololeap@users.noreply.github.com>
+Date: Sat, 4 Mar 2023 14:46:07 -0700
+Subject: [PATCH] Disable doctests
+
+Doctests are not working on ghc-9.2
+
+Signed-off-by: hololeap <hololeap@users.noreply.github.com>
+---
+ vector.cabal | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/vector.cabal b/vector.cabal
+index cea122a..c738a35 100644
+--- a/vector.cabal
++++ b/vector.cabal
+@@ -274,6 +274,7 @@ test-suite vector-tests-O2
+ Ghc-Options: -Wno-redundant-constraints
+
+ test-suite vector-doctest
++ buildable: False
+ type: exitcode-stdio-1.0
+ main-is: doctests.hs
+ hs-source-dirs: tests
+--
+2.39.2
+
diff --git a/dev-haskell/vector/files/vector-0.12.3.1-fix-testdata-float.patch b/dev-haskell/vector/files/vector-0.12.3.1-fix-testdata-float.patch
new file mode 100644
index 000000000000..8a8db580f225
--- /dev/null
+++ b/dev-haskell/vector/files/vector-0.12.3.1-fix-testdata-float.patch
@@ -0,0 +1,42 @@
+From df8dd8e8e84005aa6b187b03cd502f3c6e18cf3c Mon Sep 17 00:00:00 2001
+From: Bodigrim <andrew.lelechenko@gmail.com>
+Date: Sun, 4 Jun 2023 17:55:28 +0100
+Bug: https://github.com/haskell/vector/pull/461
+Signed-off-by: hololeap <hololeap@protonmail.com>
+Subject: [PATCH] Fix instance TestData Float/Double
+
+---
+ vector/tests/Utilities.hs | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/vector/tests/Utilities.hs b/vector/tests/Utilities.hs
+index 24799554..ae19d425 100644
+--- a/tests/Utilities.hs
++++ b/tests/Utilities.hs
+@@ -121,10 +121,24 @@ instance TestData ty where { \
+ id_TestData(())
+ id_TestData(Bool)
+ id_TestData(Int)
+-id_TestData(Float)
+-id_TestData(Double)
+ id_TestData(Ordering)
+
++instance TestData Float where
++ type Model Float = Float
++ model = id
++ unmodel = id
++
++ type EqTest Float = Property
++ equal x y = property (x == y || (isNaN x && isNaN y))
++
++instance TestData Double where
++ type Model Double = Double
++ model = id
++ unmodel = id
++
++ type EqTest Double = Property
++ equal x y = property (x == y || (isNaN x && isNaN y))
++
+ bimapEither :: (a -> b) -> (c -> d) -> Either a c -> Either b d
+ bimapEither f _ (Left a) = Left (f a)
+ bimapEither _ g (Right c) = Right (g c)