summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Graef2022-08-08 00:08:12 +0200
committerAlbert Graef2022-08-08 00:08:12 +0200
commit76c839432729e97b6e4c666288be9b5e61efb86a (patch)
tree824d99c6938af82a6065955c0aadfd7fed09eb4f
parent6f851b27e3f5a351e69a3fe392de06a2d6c142cd (diff)
downloadaur-pure-gen.tar.gz
Patch was garbled, reuploading.
-rw-r--r--PKGBUILD2
-rw-r--r--enums.patch8
2 files changed, 5 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ecd03b8b51a2..df421db7207b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,7 +14,7 @@ groups=(pure-complete pure-util)
source=("https://github.com/agraef/pure-lang/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz"
"enums.patch")
sha1sums=('c77a63a5f6456aee4a5ad0676fdd2f8925c16412'
- '982d929a1a0d4e40fc3754c1290c344c950e0148')
+ 'eb17b98bacedaf89e84b47c0904e47cda37002fa')
prepare() {
cd $srcdir/$pkgname-$pkgver
diff --git a/enums.patch b/enums.patch
index 6d67510e0f5f..2a18d53d708c 100644
--- a/enums.patch
+++ b/enums.patch
@@ -1,11 +1,11 @@
-commit 94259306f5407dd28d9417f87c118ed1f6326601
+commit f5cf7841209ff9e0cd0e7b0b2e3fbd0314ceddac
Author: Albert Graef <aggraef@gmail.com>
Date: Sun Aug 7 23:29:46 2022 +0200
pure-gen: Improve diagnostics for unrecognized enum values.
diff --git a/pure-gen/pure-gen.pure b/pure-gen/pure-gen.pure
-index 694aeeab..15b38f4d 100755
+index 694aeeab..f74daf35 100755
--- a/pure-gen/pure-gen.pure
+++ b/pure-gen/pure-gen.pure
@@ -588,10 +588,21 @@ get_enum dict _ = dict;
@@ -13,11 +13,11 @@ index 694aeeab..15b38f4d 100755
calc_enum_values dict prev ((name,Just e):more) =
- case eval_expr dict e of
-+case catch id (eval_expr dict e) of
++ case catch id (eval_expr dict e) of
val::int = calc_enum_values (insert dict (name => val)) val more;
- x = warning 0 $ "Couldn't evaluate enum expression for "+name+" : "+str e
- $$ calc_enum_values dict prev more;
-+ x = warning level $ "Unknown enum value: "+name+" = "+str e
++ x = warning level $ "Unknown enum value: "+name+" = "+estr
+ $$ calc_enum_values dict prev more when
+ estr = str e;
+ // Most of the time e will be 'Pass' which indicates a part of the