diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-06-27 13:36:29 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-06-27 13:36:29 -0400 |
commit | 22b917eeb1d101cf0b6af2c94826446e4e2f2cdb (patch) | |
tree | cf842eaf2045f5ae36579b5e64200c61a8fe7b75 /utils | |
parent | b0708588e87554899c2efc80a2d3eba353dbe926 (diff) | |
download | haskell-22b917eeb1d101cf0b6af2c94826446e4e2f2cdb.tar.gz |
Revert "Make module membership on ModuleGraph faster"
I had not intended on merging this.
This reverts commit b0708588e87554899c2efc80a2d3eba353dbe926.
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 6b973e12e8..1d577421fb 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 (mgModSummaries graph) of - [x] -> x - xs -> error $ "Can't find module, got:" - ++ show (map (ml_hs_file . ms_location) xs) + let + modSum = case filter modByFile 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 2fd44b2be0..47a95659ff 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 (mgModSummaries graph) of + modSum = case filter modByFile 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 c4db3ca212..4842a0cbfb 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 :: [ModSummary] -> (Maybe Handle, Maybe Handle) -> Ghc () -graphData mss handles = do - mapM_ foundthings mss +graphData :: ModuleGraph -> (Maybe Handle, Maybe Handle) -> Ghc () +graphData graph handles = do + mapM_ foundthings graph where foundthings ms = let filename = msHsFilePath ms modname = moduleName $ ms_mod ms |