diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/check-api-annotations/Main.hs | 10 | ||||
-rw-r--r-- | utils/check-ppr/Main.hs | 2 | ||||
-rw-r--r-- | utils/ghctags/Main.hs | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/utils/check-api-annotations/Main.hs b/utils/check-api-annotations/Main.hs index 1d577421fb..6b973e12e8 100644 --- a/utils/check-api-annotations/Main.hs +++ b/utils/check-api-annotations/Main.hs @@ -32,11 +32,11 @@ testOneFile libdir fileName = do , targetContents = Nothing } _ <- load LoadAllTargets graph <- getModuleGraph - let - modSum = case filter modByFile graph of - [x] -> x - xs -> error $ "Can't find module, got:" - ++ show (map (ml_hs_file . ms_location) xs) + let modSum = + case filter modByFile (mgModSummaries graph) of + [x] -> x + xs -> error $ "Can't find module, got:" + ++ show (map (ml_hs_file . ms_location) xs) p <- parseModule modSum return (pm_annotations p,p) diff --git a/utils/check-ppr/Main.hs b/utils/check-ppr/Main.hs index 47a95659ff..2fd44b2be0 100644 --- a/utils/check-ppr/Main.hs +++ b/utils/check-ppr/Main.hs @@ -77,7 +77,7 @@ parseOneFile libdir fileName = do _ <- load LoadAllTargets graph <- getModuleGraph let - modSum = case filter modByFile graph of + modSum = case filter modByFile (mgModSummaries graph) of [x] -> x xs -> error $ "Can't find module, got:" ++ show (map (ml_hs_file . ms_location) xs) diff --git a/utils/ghctags/Main.hs b/utils/ghctags/Main.hs index 4842a0cbfb..c4db3ca212 100644 --- a/utils/ghctags/Main.hs +++ b/utils/ghctags/Main.hs @@ -222,9 +222,9 @@ fileTarget filename = Target (TargetFile filename Nothing) True Nothing --------------------------------------------------------------- ----- CRAWLING ABSTRACT SYNTAX TO SNAFFLE THE DEFINITIONS ----- -graphData :: ModuleGraph -> (Maybe Handle, Maybe Handle) -> Ghc () -graphData graph handles = do - mapM_ foundthings graph +graphData :: [ModSummary] -> (Maybe Handle, Maybe Handle) -> Ghc () +graphData mss handles = do + mapM_ foundthings mss where foundthings ms = let filename = msHsFilePath ms modname = moduleName $ ms_mod ms |