From 753cdfe8c18b470da4a4807815d0aaade53f1d16 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 5 Feb 2021 21:56:20 -0500 Subject: Add 'tidy' to Plan This is supposed to be how to cleanup the database and any other local files. Should only be used before/after test, so maybe I can find a way to enforce this constraint somehow in the code. --- Biz/Cli.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Biz/Cli.hs') diff --git a/Biz/Cli.hs b/Biz/Cli.hs index 8398399..c144a72 100644 --- a/Biz/Cli.hs +++ b/Biz/Cli.hs @@ -24,13 +24,14 @@ import qualified System.Environment as Environment import qualified Test.Tasty as Tasty import qualified Test.Tasty.Runners as Tasty -data Plan = Plan +data Plan cfg = Plan { help :: Docopt.Docopt, move :: Docopt.Arguments -> IO (), - test :: Tasty.TestTree + test :: Tasty.TestTree, + tidy :: cfg -> IO () } -main :: Plan -> IO () +main :: Plan cfg -> IO () main Plan {..} = Environment.getArgs +> Docopt.parseArgsOrExit help -- cgit v1.2.3