diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2021-05-12 14:49:47 +0200 |
---|---|---|
committer | Andreas Klebinger <klebinger.andreas@gmx.at> | 2021-05-18 09:52:06 -0400 |
commit | 4fdbef5cbc89470cc762f3d1cc273896e08dbaf2 (patch) | |
tree | 1d0708448b535007fac7796dac6bce3324584dba | |
parent | fc9546caf3e16db070bfc7bb5523c38595233e26 (diff) | |
download | haskell-wip/andreask/derive_constants.tar.gz |
Improve deriveConstants error message.wip/andreask/derive_constants
This fixes #19823
-rw-r--r-- | utils/deriveConstants/Main.hs | 3 |
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\ |