diff options
author | Greg Steuck <greg@nest.cx> | 2021-12-24 12:58:14 -0800 |
---|---|---|
committer | Greg Steuck <blackgnezdo@gmail.com> | 2022-01-03 05:18:24 +0000 |
commit | d9e491958fab83d34f261f6adeaf3c8ace71b276 (patch) | |
tree | 32560fbd2be360053dd3bde4fdcd9688f6b78350 | |
parent | f212cece72b4be2750afa0f71f833f4b0190383a (diff) | |
download | haskell-d9e491958fab83d34f261f6adeaf3c8ace71b276.tar.gz |
Replace `seq` with POSIX-standard printf(1) in ManyAlternatives test
The test now passes on OpenBSD instead of generating broken source
which was rejected by GHC with
ManyAlternatives.hs:5:1: error:
The type signature for âfâ lacks an accompanying binding
-rwxr-xr-x | testsuite/tests/perf/compiler/genManyAlternatives | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/testsuite/tests/perf/compiler/genManyAlternatives b/testsuite/tests/perf/compiler/genManyAlternatives index 1035425bd4..6b5c79e036 100755 --- a/testsuite/tests/perf/compiler/genManyAlternatives +++ b/testsuite/tests/perf/compiler/genManyAlternatives @@ -24,11 +24,13 @@ MODULE=ManyAlternatives echo "module $MODULE where" > $MODULE.hs echo >> $MODULE.hs echo "data A$SIZE = A0" >> $MODULE.hs -for i in $(seq -w 1 $SIZE); do - echo " | A$i" >> $MODULE.hs +i=1; while test $i -lt $SIZE; do + printf " | A%03d\n" $i >> $MODULE.hs + i=$((i+1)) done echo >> $MODULE.hs echo "f :: A$SIZE -> Int" >> $MODULE.hs -for i in $(seq -w 1 $SIZE); do - echo "f A$i = 199$i" >> $MODULE.hs +i=1; while test $i -lt $SIZE; do + printf "f A%03d = 199%03d\n" $i $i >> $MODULE.hs + i=$((i+1)) done |