diff options
Diffstat (limited to 'Biz/Pie.hs')
-rw-r--r-- | Biz/Pie.hs | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -70,18 +70,18 @@ main = do addCommand "new" "start new a weekly sprint" - (const . move New) + (const <. move New) (pure mempty) addCommand "update" "submit weekly update for a namespace" - (move . Update) - (optNamespace) + (move <. Update) + optNamespace addCommand "feedback" "submit user feedback for a namespace" - (move . Feedback) - (optNamespace) + (move <. Feedback) + optNamespace cwd <- Directory.getCurrentDirectory root <- Env.getEnv "BIZ_ROOT" let fullNamespace = @@ -101,7 +101,7 @@ optNamespace = <> short 'n' <> value "Devalloc" -data Form = Form {roll :: [Entry]} +newtype Form = Form {roll :: [Entry]} deriving (Generic, Aeson.ToJSON, Aeson.FromJSON, Show) instance Monoid Form where @@ -136,7 +136,7 @@ data Move move :: Move -> Form -> IO Form move mov form = case mov of New -> do - week <- Time.getCurrentTime >>= return . Time.formatTime Time.defaultTimeLocale "%V" + week <- Time.getCurrentTime >>= return <. Time.formatTime Time.defaultTimeLocale "%V" let branch = "sprint-" <> week proc <- Process.spawnProcess "git" ["show-ref", branch] Process.waitForProcess proc >>= \case |