Follow hlint suggestion: use if.
commitbc9e619a7b171b3309843d2f94e874d88ce81c0b
authorPhil de Joux <philderbeast@gmail.com>
dateSun 16 Oct 2022, 15:14 (4 years ago)
parent31006ef
.hlint.yaml−1
@@ -8,7 +8,6 @@
88- ignore: {name: "Replace case with fromMaybe"} # 2 hints
99- ignore: {name: "Use <$>"} # 6 hints
1010- ignore: {name: "Use asks"} # 12 hints
11−- ignore: {name: "Use if"} # 1 hint
1211- ignore: {name: "Use join"} # 1 hint
1312- ignore: {name: "Use lambda-case"} # 5 hints
1413- ignore: {name: "Use list literal pattern"} # 2 hints
src/OddJobs/Cli.hs+4−5
@@ -115,11 +115,10 @@ defaultStartCommand :: CommonStartArgs
115115 -> CliType
116116 -> IO ()
117117defaultStartCommand CommonStartArgs{..} mUIArgs cliType = do
118− case startDaemonize of
119− False ->
120− coreStartupFn
121− True -> do
122− Daemon.runDetached (Just startPidFile) (Daemon.ToFile "/tmp/oddjobs.out") coreStartupFn
118+ if startDaemonize then do
119+ Daemon.runDetached (Just startPidFile) (Daemon.ToFile "/tmp/oddjobs.out") coreStartupFn
120+ else
121+ coreStartupFn
123122 where
124123 uiArgs = fromJustNote "Please specify Web UI Startup Args" $ traceShowId mUIArgs
125124 coreStartupFn =