diff options
author | Ben Sima <ben@bsima.me> | 2021-01-29 02:37:14 -0500 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-01-29 03:22:01 -0500 |
commit | b289dee25ad8ce4c2622fadb2f4c31fb90914b39 (patch) | |
tree | 5511da780cdabbb98c8fbe01f03997d3263e7880 /Biz/Cli.hs | |
parent | 42c7614b6a4bd7504e9bf31e0882db58b85857bc (diff) |
Lint 'return' into 'pure', replace bind operator
Diffstat (limited to 'Biz/Cli.hs')
-rw-r--r-- | Biz/Cli.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |