- not_found files
- | verbosity dflags < 3
- = ptext SLIT("Use -v to see a list of the files searched for.")
- | otherwise
- = hang (ptext SLIT("locations searched:")) 2 (vcat (map text files))
+ not_found_in_package pkg files
+ | build_tag /= ""
+ = let
+ build = if build_tag == "p" then "profiling"
+ else "\"" ++ build_tag ++ "\""
+ in
+ ptext (sLit "Perhaps you haven't installed the ") <> text build <>
+ ptext (sLit " libraries for package ") <> quotes (ppr pkg) <> char '?' $$
+ tried_these files
+
+ | otherwise
+ = ptext (sLit "There are files missing in the ") <> quotes (ppr pkg) <>
+ ptext (sLit " package,") $$
+ ptext (sLit "try running 'ghc-pkg check'.") $$
+ tried_these files
+
+ tried_these files
+ | null files = empty
+ | verbosity dflags < 3 =
+ ptext (sLit "Use -v to see a list of the files searched for.")
+ | otherwise =
+ hang (ptext (sLit "locations searched:")) 2 $ vcat (map text files)
+
+ pkg_hidden pkg =
+ ptext (sLit "it is a member of the hidden package") <+> quotes (ppr pkg)
+
+ mod_hidden pkg =
+ ptext (sLit "it is a hidden module in the package") <+> quotes (ppr pkg)