Skip to content

Commit

Permalink
Use mapM_ instead of sequence_ (map • •)
Browse files Browse the repository at this point in the history
  • Loading branch information
knothed committed Jun 16, 2021
1 parent 424a2ab commit 87875e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/test/src/SDist.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ sdist_test' projectDir executable localPackages bootstrapping = do
let genCabalProj = runCmdIn umbrellaDir ["echo", "'" ++ packagesText ++ "'", ">", "cabal.project"] False

-- Perform commands in sequence, stop on error
sequence_ (map rm fullNames)
sequence_ (map untar fullNames)
mapM_ rm fullNames
mapM_ untar fullNames
mkUmbrella
sequence_ (map mv fullNames)
mapM_ mv fullNames
genCabalProj

liftIO . putStrLn $ "Umbrella dir (" ++ umbrellaDir ++ ") generated successfully."
Expand Down
2 changes: 1 addition & 1 deletion packages/test/src/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import System.Exit
import Paths_happy_test

data TestSetup = TestSetup {
happyExec :: String, -- (path to the) happy exeuctable which shall be tested. "happy" should suffice here for cabal test
happyExec :: String, -- name of the happy exeuctable which shall be tested.
defaultTests :: [String], -- standard tests from happy-test package that should be performed. these are in this package's data-dir
customTests :: [String], -- custom tests from the calling package that should be performed. these are in the calling package's data-dir
customDataDir :: String, -- data-dir of the calling package. all tests are compiled and executed in their respective directory.
Expand Down

0 comments on commit 87875e2

Please sign in to comment.