diff options
Diffstat (limited to 'Biz/Pie.hs')
-rw-r--r-- | Biz/Pie.hs | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -95,12 +95,12 @@ formFile ns = ns ++ ".pie" loadForm :: String -> IO Form loadForm ns = - Directory.doesFileExist file >>= \case - False -> return mempty + Directory.doesFileExist file +> \case + False -> pure mempty True -> - Aeson.decodeFileStrict file >>= \case + Aeson.decodeFileStrict file +> \case Nothing -> panic <| Text.pack <| "could not decode: " ++ file - Just x -> return x + Just x -> pure x where file = formFile ns @@ -126,10 +126,10 @@ fromArgs args move :: Cli.Arguments -> IO () move args = case fromArgs args of New -> do - week <- Time.getCurrentTime >>= return <. Time.formatTime Time.defaultTimeLocale "%V" + week <- Time.getCurrentTime +> pure <. Time.formatTime Time.defaultTimeLocale "%V" let branch = "sprint-" <> week proc <- Process.spawnProcess "git" ["show-ref", branch] - Process.waitForProcess proc >>= \case + Process.waitForProcess proc +> \case Exit.ExitSuccess -> Process.callProcess "git" ["switch", branch] Exit.ExitFailure _ -> |