aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2008-10-10 20:02:31 +0000
committerDavid Waern <david.waern@gmail.com>2008-10-10 20:02:31 +0000
commit8a57f3d9eb971ab4957f2780ed7a0b5be0b3b6e3 (patch)
tree2ba492dcdbb0659c8321e27f7d3683f47d93ce73
parentb6195aea1e72c2afe1705c7467f6b4ff6bfe6b24 (diff)
Remove typecheckFiles and MonadUtils import from H.GHC.Typeccheck
-rw-r--r--src/Haddock/GHC/Typecheck.hs31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/Haddock/GHC/Typecheck.hs b/src/Haddock/GHC/Typecheck.hs
index 3f116fed..3ef1957f 100644
--- a/src/Haddock/GHC/Typecheck.hs
+++ b/src/Haddock/GHC/Typecheck.hs
@@ -6,7 +6,6 @@
module Haddock.GHC.Typecheck (
- typecheckFiles,
mkGhcModule
) where
@@ -22,7 +21,6 @@ import HscTypes ( msHsFilePath )
import Digraph
import BasicTypes
import SrcLoc
-import MonadUtils ( liftIO )
import Data.List
@@ -36,35 +34,6 @@ type FullyCheckedMod = (ParsedSource,
ModuleInfo)
--- TODO: make it handle cleanup
-typecheckFiles :: [FilePath] -> Ghc [GhcModule]
-typecheckFiles files = do
- targets <- mapM (\f -> guessTarget f Nothing) files
- setTargets targets
- modgraph <- depanal [] False
- let ordered_mods = flattenSCCs $ topSortModuleGraph False modgraph Nothing
- process_mods ordered_mods
- where
- process_mods mods =
- forM mods $ \modsum ->
- handleSourceError
- (\err -> do
- printExceptionAndWarnings err
- throwE ("Failed to check module: " ++ moduleString (ms_mod modsum))) $
- do
- liftIO $ putStrLn $ "Processing " ++ moduleString (ms_mod modsum)
- let filename = msHsFilePath modsum
- let flags = ms_hspp_opts modsum
- tc_mod <- loadModule =<< typecheckModule =<< parseModule modsum
- let Just renamed_src = renamedSource tc_mod
- return $ mkGhcModule (ms_mod modsum,
- filename,
- (parsedSource tc_mod,
- renamed_src,
- typecheckedSource tc_mod,
- moduleInfo tc_mod))
- flags
-
-- | Dig out what we want from the typechecker output
mkGhcModule :: CheckedMod -> DynFlags -> GhcModule
mkGhcModule (mod, file, checkedMod) dynflags = GhcModule {