From aa2eb2d3e08fb74b93acc9608a78582834a65e8c Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 18 Aug 2021 14:20:50 -0400 Subject: FOrmatting --- Biz/Bild.hs | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'Biz/Bild.hs') 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] -- cgit v1.2.3