summaryrefslogtreecommitdiff
path: root/utils/deriveConstants
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-26 19:58:13 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-06 13:03:16 -0400
commitc41c478eb9003eaa9fc8081a0039652448124f5d (patch)
tree82a962e73d37b5c3d9b705ad211aeb69cfd2c265 /utils/deriveConstants
parent018453751b10cf26506d5076f08fc3a537973d9e (diff)
downloadhaskell-c41c478eb9003eaa9fc8081a0039652448124f5d.tar.gz
Fix a few new warnings when booting with GHC 9.2.2
-Wuni-incomplete-patterns and apparent improvements in the pattern match checker surfaced these.
Diffstat (limited to 'utils/deriveConstants')
-rw-r--r--utils/deriveConstants/Main.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/deriveConstants/Main.hs b/utils/deriveConstants/Main.hs
index 4832ccfc89..9a57ecf682 100644
--- a/utils/deriveConstants/Main.hs
+++ b/utils/deriveConstants/Main.hs
@@ -814,7 +814,7 @@ getWanted verbose os tmpdir gccProgram gccFlags nmProgram mobjdumpProgram
, Just sym <- stripPrefix prefix sym0 = Just (sym, read n)
| otherwise = Nothing
where
- [sym0, _] = take 2 (reverse $ words l1)
+ sym0 = head $ reverse $ words l1
-- If an Int value is larger than 2^28 or smaller
-- than -2^28, then fail.