Skip to content

Commit

Permalink
Filter non test module when filling module data
Browse files Browse the repository at this point in the history
  • Loading branch information
bonnefoa committed Nov 30, 2010
1 parent 055cd65 commit e31899a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Shaker/GhcInterface.hs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ configureDynFlagsWithCompileInput cpIn dflags = dflags{

fillModuleDataTest :: [ModuleData] -> Shaker IO [[ModuleData]]
fillModuleDataTest = separateEqual
>>> mapM fillModuleDataTest'
>>> mapM fillModuleDataTest'

fillModuleDataTest' :: [ModuleData] -> Shaker IO [ModuleData]
fillModuleDataTest' modDatas = do
Expand All @@ -107,7 +107,10 @@ fillModuleDataTest' modDatas = do
mss <- depanal [] False
let sort_mss = flattenSCCs $ topSortModuleGraph True mss Nothing
mapM convertModSummaryToModuleData sort_mss
mergeMdatas >>> filter (\a -> moduleDataName a /= "") >>> return $ (modDatas ++ ghcModuleDatas)
mergeMdatas
>>> filter (\a -> moduleDataName a /= "")
>>> removeNonTestModules
>>> return $ (modDatas ++ ghcModuleDatas)

mergeMdatas :: [ModuleData] -> [ModuleData]
mergeMdatas lstMdatas = map (\mdata -> filter (==mdata) >>> mconcat $ lstMdatas) uniqueMdata
Expand Down

0 comments on commit e31899a

Please sign in to comment.