summaryrefslogtreecommitdiff
path: root/Biz/Pie.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-12-24 14:24:16 -0500
committerBen Sima <ben@bsima.me>2020-12-24 14:24:16 -0500
commit6eaaf3d8ce6025932990de6fa697d14c9651be76 (patch)
tree65ca4a0dd0393db98d9a6067bbbef789469e8122 /Biz/Pie.hs
parent6a4a8aa37044d578c95dea145b9605908b8dc28d (diff)
linting fixes and cleanup
Diffstat (limited to 'Biz/Pie.hs')
-rw-r--r--Biz/Pie.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Biz/Pie.hs b/Biz/Pie.hs
index d3fca5f..7df794f 100644
--- a/Biz/Pie.hs
+++ b/Biz/Pie.hs
@@ -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