summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/idris-build-with-megaparsec-9.patch
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-10-02 17:58:32 +0200
committerLars-Dominik Braun <lars@6xq.net>2021-10-08 09:13:53 +0200
commited044023d7ed8cfe113f4d6e1a6af17a09f49795 (patch)
tree98700fb73d25f484f4abf4d606c10b2c8852d25e /gnu/packages/patches/idris-build-with-megaparsec-9.patch
parentda9ba3880c71fd125ab6a67deade3668c0be2a6c (diff)
downloadguix-patches-ed044023d7ed8cfe113f4d6e1a6af17a09f49795.tar
guix-patches-ed044023d7ed8cfe113f4d6e1a6af17a09f49795.tar.gz
gnu: idris: Fix build.
Backport some commits from upstream. * gnu/packages/patches/idris-build-with-haskeline-0.8.patch: * gnu/packages/patches/idris-build-with-megaparsec-9.patch: New patches * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/idris.scm (idris): Use them. Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
Diffstat (limited to 'gnu/packages/patches/idris-build-with-megaparsec-9.patch')
-rw-r--r--gnu/packages/patches/idris-build-with-megaparsec-9.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu/packages/patches/idris-build-with-megaparsec-9.patch b/gnu/packages/patches/idris-build-with-megaparsec-9.patch
new file mode 100644
index 0000000000..6d7ff1d713
--- /dev/null
+++ b/gnu/packages/patches/idris-build-with-megaparsec-9.patch
@@ -0,0 +1,27 @@
+From 6ea9bc913877d765048d7cdb7fc5aec60b196fac Mon Sep 17 00:00:00 2001
+From: Felix Yan <felixonmars@archlinux.org>
+Date: Wed, 16 Dec 2020 21:48:32 +0800
+Subject: [PATCH] Fix compatibility with megaparsec 9
+
+---
+Taken from <https://github.com/idris-lang/Idris-dev/pull/4892>
+
+ src/Idris/Parser/Stack.hs | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/Idris/Parser/Stack.hs b/src/Idris/Parser/Stack.hs
+index fb7b611440..879786f4d2 100644
+--- a/src/Idris/Parser/Stack.hs
++++ b/src/Idris/Parser/Stack.hs
+@@ -84,7 +84,11 @@ instance Message ParseError where
+ (pos, _) = P.reachOffsetNoLine (parseErrorOffset err) (parseErrorPosState err)
+ #endif
+ messageText = PP.text . init . P.parseErrorTextPretty . parseError
++#if MIN_VERSION_megaparsec(9,0,0)
++ messageSource err = sline
++#else
+ messageSource err = Just sline
++#endif
+ where
+ #if MIN_VERSION_megaparsec(8,0,0)
+ (sline, _) = P.reachOffset (parseErrorOffset err) (parseErrorPosState err)