This repository was archived by the owner on Aug 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ import qualified Data.Set as Set
48
48
import Distribution.Verbosity
49
49
import System.Directory
50
50
import System.FilePath
51
+ import System.IO
51
52
import Text.Printf
52
53
53
54
import Digraph
@@ -57,6 +58,8 @@ import GHC hiding (verbosity)
57
58
import HscTypes
58
59
import FastString (unpackFS )
59
60
61
+ import MonadUtils (liftIO )
62
+
60
63
-- | Create 'Interface's and a link environment by typechecking the list of
61
64
-- modules using the GHC API and processing the resulting syntax trees.
62
65
processModules
@@ -162,10 +165,19 @@ createIfaces verbosity flags instIfaceMap mods = do
162
165
Nothing -> (ifaces, ifaceMap) -- Boot modules don't generate ifaces.
163
166
164
167
168
+ inspect s a = do
169
+ r <- a
170
+ liftIO $ putStrLn s
171
+ return r
172
+
173
+
165
174
processModule :: Verbosity -> ModSummary -> [Flag ] -> IfaceMap -> InstIfaceMap -> Ghc (Maybe Interface )
166
175
processModule verbosity modsum flags modMap instIfaceMap = do
167
176
out verbosity verbose $ " Checking module " ++ moduleString (ms_mod modsum) ++ " ..."
168
- tm <- loadModule =<< typecheckModule =<< parseModule modsum
177
+ liftIO $ putStrLn " Before parseModule"
178
+ liftIO $ print =<< hGetEncoding stderr
179
+ tm <- inspect " loadModule" $ loadModule =<< (inspect " typecheckModule" $ typecheckModule =<< inspect " parseModule" (parseModule modsum))
180
+ liftIO $ putStrLn " After loadModule"
169
181
if not $ isBootSummary modsum then do
170
182
out verbosity verbose " Creating interface..."
171
183
(interface, msg) <- runWriterGhc $ createInterface tm flags modMap instIfaceMap
You can’t perform that action at this time.
0 commit comments