@@ -66,7 +66,7 @@ getOtherModulesFiles :: GenericPackageDescription -> [FilePath]
66
66
getOtherModulesFiles gpd = mainModules ++ map fromModuleName otherModules'
67
67
where
68
68
testSuites :: [TestSuite ]
69
- testSuites = map (foldCondTree . snd ) (condTestSuites gpd)
69
+ testSuites = map (foldMapCondTree id . snd ) (condTestSuites gpd)
70
70
71
71
mainModules = concatMap (mainModule . testInterface) testSuites
72
72
otherModules' = concatMap (otherModules . testBuildInfo) testSuites
@@ -104,11 +104,11 @@ strictReadFile fp = do
104
104
where
105
105
get h = IO. hGetContents h >>= \ s -> length s `seq` return s
106
106
107
- foldCondTree :: Monoid a => CondTree v c a -> a
108
- foldCondTree (CondNode x _ cs)
109
- = mappend x
110
- -- list, 3-tuple, maybe
111
- $ (foldMap . foldMapTriple . foldMap ) foldCondTree cs
107
+ foldMapCondTree :: Monoid m => ( a -> m ) -> CondTree v c a -> m
108
+ foldMapCondTree f (CondNode x _ cs)
109
+ = mappend (f x)
110
+ -- list, 3-tuple+ maybe
111
+ $ (foldMap . foldMapTriple . foldMapCondTree) f cs
112
112
where
113
- foldMapTriple :: ( c -> x ) -> (a , b , c ) -> x
114
- foldMapTriple f (_, _, x ) = f x
113
+ foldMapTriple :: Monoid x => ( b -> x ) -> (a , b , Maybe b ) -> x
114
+ foldMapTriple f (_, x, y ) = mappend ( f x) ( foldMap f y)
0 commit comments