Commit dcf82732 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add some diagnostic info to some internal errors

When giving an "internal error: unexpected package db stack" error, say
what the stack is.
parent f5e5b939
......@@ -821,7 +821,7 @@ ghcPackageDbOptions dbstack = case dbstack of
where
specific (SpecificPackageDB db) = [ "-package-conf", db ]
specific _ = ierror
ierror = error "internal error: unexpected package db stack"
ierror = error ("internal error: unexpected package db stack: " ++ show dbstack)
constructCcCmdLine :: LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo
-> FilePath -> FilePath -> Verbosity -> Bool
......
......@@ -657,7 +657,7 @@ ghcPackageDbOptions dbstack = case dbstack of
where
specific (SpecificPackageDB db) = [ "-package-conf", db ]
specific _ = ierror
ierror = error "internal error: unexpected package db stack"
ierror = error ("internal error: unexpected package db stack: " ++ show dbstack)
constructCcCmdLine :: LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo
-> FilePath -> FilePath -> Verbosity -> (FilePath,[String])
......
......@@ -239,7 +239,7 @@ packageDbStackOpts dbstack = case dbstack of
where
specific (SpecificPackageDB db) = "--package-conf=" ++ db
specific _ = ierror
ierror = error "internal error: unexpected package db stack"
ierror = error ("internal error: unexpected package db stack: " ++ show dbstack)
packageDbOpts :: PackageDB -> String
packageDbOpts GlobalPackageDB = "--global"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment