summaryrefslogtreecommitdiff
path: root/Biz/Cli.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-02-05 21:56:20 -0500
committerBen Sima <ben@bsima.me>2021-02-05 21:56:20 -0500
commit753cdfe8c18b470da4a4807815d0aaade53f1d16 (patch)
tree1194557e0e0ab2e825c2786bf4bcccc33e86da27 /Biz/Cli.hs
parent1c75a8ee4c9914c7d482b38195b813b12ef4f834 (diff)
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.
Diffstat (limited to 'Biz/Cli.hs')
-rw-r--r--Biz/Cli.hs7
1 files changed, 4 insertions, 3 deletions
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