diff options
| author | Lemmih <lemmih@gmail.com> | 2006-03-04 13:03:27 +0000 |
|---|---|---|
| committer | Lemmih <lemmih@gmail.com> | 2006-03-04 13:03:27 +0000 |
| commit | e5ea30e69a99b71fbd7045daefdf2cbf66c659d4 (patch) | |
| tree | f63e2ab3cf238f6c20223fbb5d6cfd508d2f6a65 /ghc/compiler/main/GHC.hs | |
| parent | 2403cadce8d001bd1f63574554cbe8c6da51cc13 (diff) | |
| download | haskell-e5ea30e69a99b71fbd7045daefdf2cbf66c659d4.tar.gz | |
Remove the old HscMain code.
Diffstat (limited to 'ghc/compiler/main/GHC.hs')
| -rw-r--r-- | ghc/compiler/main/GHC.hs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/ghc/compiler/main/GHC.hs b/ghc/compiler/main/GHC.hs index 29e2c66a35..b38b3795b6 100644 --- a/ghc/compiler/main/GHC.hs +++ b/ghc/compiler/main/GHC.hs @@ -211,7 +211,7 @@ import DriverPhases ( Phase(..), isHaskellSrcFilename, startPhase ) import GetImports ( getImports ) import Packages ( isHomePackage ) import Finder -import HscMain ( newHscEnv, hscFileCheck, HscResult(..) ) +import HscMain ( newHscEnv, hscFileCheck, HscChecked(..) ) import HscTypes import DynFlags import StaticFlags @@ -776,18 +776,17 @@ checkModule session@(Session ref) mod = do return Nothing else do - r <- hscFileCheck hsc_env{hsc_dflags=dflags1} ms - case r of - HscFail -> - return Nothing - HscChecked parsed renamed Nothing -> + mbChecked <- hscFileCheck hsc_env{hsc_dflags=dflags1} ms + case mbChecked of + Nothing -> return Nothing + Just (HscChecked parsed renamed Nothing) -> return (Just (CheckedModule { parsedSource = parsed, renamedSource = renamed, typecheckedSource = Nothing, checkedModuleInfo = Nothing })) - HscChecked parsed renamed - (Just (tc_binds, rdr_env, details)) -> do + Just (HscChecked parsed renamed + (Just (tc_binds, rdr_env, details))) -> do let minf = ModuleInfo { minf_type_env = md_types details, minf_exports = md_exports details, @@ -799,7 +798,7 @@ checkModule session@(Session ref) mod = do renamedSource = renamed, typecheckedSource = Just tc_binds, checkedModuleInfo = Just minf })) - _other -> + _other -> panic "checkModule" -- --------------------------------------------------------------------------- |
