Do dependency analysis when kind-checking type declarations
[ghc-hetmet.git] / ghc / InteractiveUI.hs
index 278470f..eaf2d2d 100644 (file)
@@ -44,7 +44,6 @@ import Name
 import SrcLoc
 
 -- Other random utilities
-import CmdLineParser
 import Digraph
 import BasicTypes hiding (isTopLevel)
 import Panic      hiding (showException)
@@ -1562,7 +1561,9 @@ newDynFlags minus_opts = do
       liftIO $ handleFlagWarnings dflags' warns
 
       if (not (null leftovers))
-        then ghcError $ errorsToGhcException leftovers
+        then ghcError . CmdLineError
+           $ "Some flags have not been recognized: "
+          ++ (concat . intersperse ", " $ map unLoc leftovers)
         else return ()
 
       new_pkgs <- setDynFlags dflags'