Skip to content

Commit df41705

Browse files
committed
Fix supported-languages dummy output
1 parent 0b1cc88 commit df41705

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

lib/supported-languages.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,5 +305,8 @@ evalPackages.writeTextFile {
305305
NoUnliftedNewtypes
306306
ViewPatterns
307307
NoViewPatterns
308-
'';
308+
${pkgs.lib.optionalString (builtins.compareVersions ghc.version "9.11" >=0) ''
309+
OrPatterns
310+
NoOrPatterns
311+
''}'';
309312
}

test/supported-langauges/default.nix

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ in recurseIntoAttrs {
1313

1414
buildCommand = ''
1515
expected=$(mktemp)
16-
${ghc}/bin/${ghc.targetPrefix}ghc --supported-languages >$expected
16+
dummy=$(mktemp)
17+
${ghc}/bin/${ghc.targetPrefix}ghc --supported-languages | sort >$expected
18+
sort ${supported-langauges} > $dummy
1719
18-
echo 'diff -u $expected ${supported-langauges}'
19-
diff -u $expected ${supported-langauges}
20+
echo 'Expected `${ghc}/bin/${ghc.targetPrefix}ghc --supported-languages | sort`'
21+
echo 'The calculated by lib/supported-languages.nix `sort ${supported-langauges}`'
22+
echo 'diff -u $dummy $expected'
23+
diff -u $dummy $expected
2024
2125
touch $out
2226
'';

0 commit comments

Comments
 (0)