From b289dee25ad8ce4c2622fadb2f4c31fb90914b39 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 29 Jan 2021 02:37:14 -0500 Subject: Lint 'return' into 'pure', replace bind operator --- Biz/Cli.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Biz/Cli.hs') diff --git a/Biz/Cli.hs b/Biz/Cli.hs index 7ecd0c6..8398399 100644 --- a/Biz/Cli.hs +++ b/Biz/Cli.hs @@ -33,8 +33,8 @@ data Plan = Plan main :: Plan -> IO () main Plan {..} = Environment.getArgs - >>= Docopt.parseArgsOrExit help - >>= \args -> + +> Docopt.parseArgsOrExit help + +> \args -> if args `has` Docopt.command "test" then runTests test else @@ -49,7 +49,7 @@ runTests tree = do Nothing -> do hPutStrLn stderr <| Text.pack "no ingredients agreed to run" exitFailure - Just act -> act >>= \ok -> if ok then exitSuccess else exitFailure + Just act -> act +> \ok -> if ok then exitSuccess else exitFailure has :: Docopt.Arguments -> Docopt.Option -> Bool has = Docopt.isPresent -- cgit v1.2.3