File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ data Opts = Opts {
2+ compilerStats :: Bool
3+ }
4+
5+ options =
6+ (\compilerStats -> Main.Opts { compilerStats })
7+ <$> Options.switch (Flag.long "compiler-stats" <> Flag.help "Pass --compiler-stats in?")
8+
19main = do
2- examples <- Directory.listDirectory "examples/"
3- let check = \fp -> do
4- Text.putStrLn $ Text.concat ["Checking ", fp]
5- Process.runProcess_ (Process.proc "hell" ["--check", fp])
6- Monad.forM_ examples \example -> do
7- check $ Text.concat ["examples/", example]
8- check "scripts/static-build.hell"
9- check "scripts/install-hell.hell"
10+ opts <- Options.execParser (Options.info (Main.options <**> Options.helper) Options.fullDesc)
11+ let extra = if Record.get @"compilerStats" opts
12+ then ["--compiler-stats"]
13+ else []
14+ let list = \dir ->
15+ Functor.fmap (List.filter (Text.isSuffixOf ".hell") . List.map (\x -> dir <> x))
16+ $ Directory.listDirectory dir
17+ examples <- list "examples/"
18+ scripts <- list "scripts/"
19+ Async.pooledForConcurrently (examples <> scripts) \fp -> do
20+ Text.putStrLn $ Text.concat ["Checking ", fp]
21+ Process.runProcess_ (Process.proc "hell" (["--check", fp] <> extra))
1022 Text.putStrLn "All OK."
You can’t perform that action at this time.
0 commit comments