summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2021-05-12 14:49:47 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-27 02:36:23 -0400
commitce1b8f4208530fe6449506ba22e3a05048f81564 (patch)
treef4f8b95ec85184d8c9f6e2deb0b51752c5f855b0
parent9935e99c893b9d5eb0a879116144cf62cc986e7d (diff)
downloadhaskell-ce1b8f4208530fe6449506ba22e3a05048f81564.tar.gz
Improve deriveConstants error message.
This fixes #19823
-rw-r--r--utils/deriveConstants/Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/deriveConstants/Main.hs b/utils/deriveConstants/Main.hs
index 9db673a985..5a227fb63f 100644
--- a/utils/deriveConstants/Main.hs
+++ b/utils/deriveConstants/Main.hs
@@ -893,7 +893,8 @@ writeHaskellType fn ws = atomicWriteFile fn xs
\ s <- readFile fp\n\
\ let def = \"#define HS_CONSTANTS \\\"\"\n\
\ find [] xs = xs\n\
- \ find _ [] = error $ \"Couldn't find \" ++ def ++ \" in \" ++ fp\n\
+ \ find _ [] = error $ \"GHC couldn't find the RTS constants (\"++def++\") in \" ++ fp ++ \": the RTS package you are trying to use is perhaps for another GHC version\" ++\n\
+ \ \"(e.g. you are using the wrong package database) or the package database is broken.\\n\"\n\
\ find (d:ds) (x:xs)\n\
\ | d == x = find ds xs\n\
\ | otherwise = find def xs\n\n\