From 27e609910cbf61f792b857181b60d42ca8fdf9be Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 28 Nov 2020 09:25:14 -0500 Subject: Ormolu formatting --- Biz/Pie.hs | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'Biz/Pie.hs') diff --git a/Biz/Pie.hs b/Biz/Pie.hs index 409f14f..8c8989d 100644 --- a/Biz/Pie.hs +++ b/Biz/Pie.hs @@ -103,11 +103,13 @@ formFile :: String -> FilePath formFile ns = ns ++ ".pie" loadForm :: Namespace -> IO Form -loadForm ns = Directory.doesFileExist file >>= \case - False -> touch file >> return mempty - True -> Aeson.decodeFileStrict file >>= \case - Nothing -> panic <| Text.pack <| "could not decode: " ++ file - Just x -> return x +loadForm ns = + Directory.doesFileExist file >>= \case + False -> touch file >> return mempty + True -> + Aeson.decodeFileStrict file >>= \case + Nothing -> panic <| Text.pack <| "could not decode: " ++ file + Just x -> return x where file = formFile ns touch f = writeFile f "" @@ -132,23 +134,25 @@ move mov form = case mov of Exit.ExitFailure _ -> Process.callProcess "git" ["switch", "-c", branch] >> return form - Update -> Haskeline.runInputT Haskeline.defaultSettings <| do - timestamp <- liftIO Clock.getCurrentTime - onTrack <- parseBool Haskeline.runInputT Haskeline.defaultSettings <| do - timestamp <- liftIO Clock.getCurrentTime - user <- parseText + Haskeline.runInputT Haskeline.defaultSettings <| do + timestamp <- liftIO Clock.getCurrentTime + onTrack <- parseBool + Haskeline.runInputT Haskeline.defaultSettings <| do + timestamp <- liftIO Clock.getCurrentTime + user <- parseText Haskeline.InputT IO String question q = Maybe.fromJust