diff options
author | Ben Sima <ben@bsima.me> | 2021-08-18 14:20:50 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-11-26 13:47:37 -0500 |
commit | aa2eb2d3e08fb74b93acc9608a78582834a65e8c (patch) | |
tree | 92fdded37906a68bc6cfcb31f27d73a4742b7fa2 | |
parent | 1176a24a1f76f551ec32eda731e8d5cdf93ad085 (diff) |
FOrmatting
-rw-r--r-- | Biz/Bild.hs | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/Biz/Bild.hs b/Biz/Bild.hs index 01a9df7..5b5aa0d 100644 --- a/Biz/Bild.hs +++ b/Biz/Bild.hs @@ -156,9 +156,14 @@ main = Cli.main <| Cli.Plan help move test pure Test.group "Biz.Bild" [ Test.unit "can bild bild" <| do - analyze "Biz/Bild.hs" /> Maybe.fromJust +> build False False +> \case - Exit.ExitFailure _ -> Test.assertFailure "can't bild bild" - _ -> pure () + analyze "Biz/Bild.hs" + /> Maybe.fromJust + +> build False False + +> \case + Exit.ExitFailure _ -> + Test.assertFailure "can't bild bild" + _ -> + pure () ] move :: Cli.Arguments -> IO () @@ -178,8 +183,18 @@ move args = printOrBuild :: Map FilePath Target -> IO [ExitCode] printOrBuild analyses = if args `Cli.has` Cli.longOption "analyze" - then Map.elems analyses |> putJSON >> pure [Exit.ExitSuccess] - else Map.toList analyses |> map snd |> traverse (build isTest isLoud) + then + analyses + |> Map.elems + |> putJSON + >> pure [Exit.ExitSuccess] + else do + root <- Env.getEnv "BIZ_ROOT" + createHier root + analyses + |> Map.toList + |> map snd + |> traverse (build isTest isLoud) isTest = args `Cli.has` Cli.longOption "test" isLoud = args `Cli.has` Cli.longOption "loud" putJSON = Aeson.encode .> ByteString.toStrict .> Char8.putStrLn @@ -435,7 +450,6 @@ isSuccess _ = False build :: Bool -> Bool -> Target -> IO Exit.ExitCode build andTest loud Target {..} = do root <- Env.getEnv "BIZ_ROOT" - createHier root case compiler of GhcExe -> do Log.info ["bild", "dev", "ghc-exe", nschunk namespace] |