@@ -24,7 +24,7 @@ import Prelude
24
24
25
25
collectTests :: [FilePath ] -> IO [(String , String , String , String )]
26
26
collectTests roots = do
27
- concat <$> traverse findAllTests ( map (<> " /Test" ) roots)
27
+ concat <$> traverse ( findAllTests . (<> " /Test" )) roots
28
28
where
29
29
findAllTests :: FilePath -> IO [(String , String , String , String )]
30
30
findAllTests root = do
@@ -49,7 +49,7 @@ collectTests roots = do
49
49
if isDir
50
50
then do
51
51
entries <- listDirectory d
52
- concat <$> traverse findPaths ( map (d </> ) entries)
52
+ concat <$> traverse ( findPaths . (d </> )) entries
53
53
else pure [d]
54
54
55
55
contexts :: [a ] -> [([a ], a )]
@@ -82,7 +82,7 @@ collectTestsInModule fn = do
82
82
s <- readFile fn
83
83
let xs = contexts (lines s)
84
84
pure $ flip mapMaybe xs $ \ (previousLines, line) -> do
85
- case ( words line) of
85
+ case words line of
86
86
(name@ (' t' : ' e' : ' s' : ' t' : _) : " ::" : _) -> do
87
87
let (summary, fullDesc) = collectDescription previousLines
88
88
pure (name, summary, fullDesc)
@@ -117,7 +117,7 @@ testHooks hooks =
117
117
" allTests :: [(String, String, String, String, App ())]" ,
118
118
" allTests =" ,
119
119
" [" ,
120
- " " <> intercalate " ,\n " (map (\ (m, n, s, f) -> " (" <> ( intercalate " , " [show m, show n, show s, show f, (m <> " ." <> n)]) <> " )" ) tests),
120
+ " " <> intercalate " ,\n " (map (\ (m, n, s, f) -> " (" <> intercalate " , " [show m, show n, show s, show f, (m <> " ." <> n)] <> " )" ) tests),
121
121
" ]"
122
122
]
123
123
)
0 commit comments