From 3acdd9ead67fa660de6a4ffaaf409ef31d1899b2 Mon Sep 17 00:00:00 2001 From: Yura Lazarev Date: Sat, 13 Jun 2026 09:44:03 +0200 Subject: [PATCH] fix: move comment out of the foreign return table pslua's foreign parser only treats lines before "return" as a verbatim header; a comment inside the returned table is parsed as Lua and rejected ("unexpected '-'"). The Lua 5.1 compat commit left the math.maxinteger note inside the table, so linking Data.EuclideanRing failed. scripts/build swallowed that: each pslua call ran unchecked, so the script exited 0 and CI went green while the linker error scrolled past. Add set -euo pipefail so a codegen failure actually fails the build. --- scripts/build | 1 + src/Data/EuclideanRing.lua | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build b/scripts/build index 68717441..011fc05b 100755 --- a/scripts/build +++ b/scripts/build @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -euo pipefail echo "Building..." diff --git a/src/Data/EuclideanRing.lua b/src/Data/EuclideanRing.lua index e419766f..157ca921 100644 --- a/src/Data/EuclideanRing.lua +++ b/src/Data/EuclideanRing.lua @@ -1,5 +1,6 @@ +-- math.maxinteger is Lua 5.3+; PureScript Int is 32-bit, hence the +-- literal bound in intDegree. return { - -- math.maxinteger is Lua 5.3+; PureScript Int is 32-bit intDegree = (function(x) return math.min(math.abs(x), 2147483647) end), intDiv = (function(x) return function(y)