summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Terei <davidterei@gmail.com>2011-05-10 16:36:44 -0700
committerDavid Terei <davidterei@gmail.com>2011-06-17 18:39:29 -0700
commitf04bbfdb0e8187c6ace27fc3a5627a8910310241 (patch)
tree88a4cb323e1a9289a87d262f2d298dea2d516ade
parent3cf28893a949775b01e6bd870ad9c7f2fa68b76f (diff)
downloadhaskell-f04bbfdb0e8187c6ace27fc3a5627a8910310241.tar.gz
SafeHaskell: Fix a warning stopping validation
-rw-r--r--compiler/typecheck/TcErrors.lhs4
-rw-r--r--ghc/InteractiveUI.hs8
2 files changed, 7 insertions, 5 deletions
diff --git a/compiler/typecheck/TcErrors.lhs b/compiler/typecheck/TcErrors.lhs
index 29a98ac6fc..d43ba774e8 100644
--- a/compiler/typecheck/TcErrors.lhs
+++ b/compiler/typecheck/TcErrors.lhs
@@ -631,10 +631,10 @@ reportOverlap ctxt inst_envs orig pred@(ClassP clas tys)
-- Overlap error because of SafeHaskell (first match should be the most
-- specific match)
- mk_overlap_msg (matches, unifiers, True)
+ mk_overlap_msg (matches, _unifiers, True)
= ASSERT( length matches > 1 )
vcat [ addArising orig (ptext (sLit "Unsafe overlapping instances for")
- <+> pprPred pred)
+ <+> pprPredTy pred)
, sep [ptext (sLit "The matching instance is") <> colon,
nest 2 (pprInstance $ head ispecs)]
, vcat [ ptext $ sLit "It is compiled in a Safe module and as such can only"
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 2d8d6ff02d..8b4422e487 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -1794,10 +1794,12 @@ showPackages = do
liftIO $ putStrLn $ showSDoc $ vcat $
text ("active package flags:"++if null pkg_flags then " none" else "")
: map showFlag pkg_flags
- where showFlag (ExposePackage p) = text $ " -package " ++ p
- showFlag (HidePackage p) = text $ " -hide-package " ++ p
- showFlag (IgnorePackage p) = text $ " -ignore-package " ++ p
+ where showFlag (ExposePackage p) = text $ " -package " ++ p
+ showFlag (HidePackage p) = text $ " -hide-package " ++ p
+ showFlag (IgnorePackage p) = text $ " -ignore-package " ++ p
showFlag (ExposePackageId p) = text $ " -package-id " ++ p
+ showFlag (TrustPackage p) = text $ " -trust " ++ p
+ showFlag (DistrustPackage p) = text $ " -distrust " ++ p
showLanguages :: GHCi ()
showLanguages = do