diff options
author | Albert Graef | 2022-08-08 00:08:12 +0200 |
---|---|---|
committer | Albert Graef | 2022-08-08 00:08:12 +0200 |
commit | 76c839432729e97b6e4c666288be9b5e61efb86a (patch) | |
tree | 824d99c6938af82a6065955c0aadfd7fed09eb4f | |
parent | 6f851b27e3f5a351e69a3fe392de06a2d6c142cd (diff) | |
download | aur-pure-gen.tar.gz |
Patch was garbled, reuploading.
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | enums.patch | 8 |
2 files changed, 5 insertions, 5 deletions
@@ -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 |