summaryrefslogtreecommitdiff
path: root/utils/genprimopcode
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/genprimopcode
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/genprimopcode')
-rw-r--r--utils/genprimopcode/Main.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/genprimopcode/Main.hs b/utils/genprimopcode/Main.hs
index c4261e1e00..2bd12e117b 100644
--- a/utils/genprimopcode/Main.hs
+++ b/utils/genprimopcode/Main.hs
@@ -673,7 +673,11 @@ gen_primop_list (Info _ entries)
map (\p -> " , " ++ cons p) rest
++
[ " ]" ]
- ) where (first:rest) = concatMap desugarVectorSpec (filter is_primop entries)
+ ) where
+ (first,rest) =
+ case concatMap desugarVectorSpec (filter is_primop entries) of
+ x:xs -> (x,xs)
+ [] -> error "gen_primop_list: no primops"
mIN_VECTOR_UNIQUE :: Int
mIN_VECTOR_UNIQUE = 300