import Maybes
import Bag ( emptyBag, listToBag )
-import Control.Exception
+import Exception
import Control.Monad
import System.Exit
import System.IO
return (source_imps, ordinary_imps, mod)
parseError :: SrcSpan -> Message -> a
-parseError span err = throwDyn $ mkPlainErrMsg span err
+parseError span err = throwErrMsg $ mkPlainErrMsg span err
isSourceIdecl :: ImportDecl name -> Bool
isSourceIdecl (ImportDecl _ s _ _ _) = s
-> FilePath -- input file
-> IO [Located String] -- options, if any
getOptionsFromFile dflags filename
- = Control.Exception.bracket
+ = Exception.bracket
(openBinaryFile filename ReadMode)
(hClose)
(\handle ->
checkProcessArgsResult :: [String] -> FilePath -> IO ()
checkProcessArgsResult flags filename
- = do when (notNull flags) (throwDyn (ProgramError (
+ = do when (notNull flags) (ghcError (ProgramError (
showSDoc (hang (text filename <> char ':')
4 (text "unknown flags in {-# OPTIONS #-} pragma:" <+>
hsep (map text flags)))