Skip to content

Commit a5dca89

Browse files
committed
separate docopts debug logging
1 parent a983142 commit a5dca89

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/QuickBench.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ defaultFile :: FilePath
6262
defaultFile = "bench.sh"
6363

6464
data Opts = Opts {
65-
docopts :: Arguments,
6665
file :: Maybe FilePath
6766
,executables :: [String]
6867
,iterations :: Int
@@ -91,7 +90,6 @@ getOpts = do
9190
precision' <- readint $ fromJust $ option "precision"
9291
let
9392
opts = Opts {
94-
docopts = dopts,
9593
file = option "file"
9694
,executables = maybe [] (splitOn ",") $ option "with"
9795
,iterations = iterations'
@@ -103,7 +101,8 @@ getOpts = do
103101
,help = flag "help"
104102
,clicmds = args
105103
}
106-
when (debug opts || "--debug" `elem` lateflags) $ err $ ppShow opts ++ "\n"
104+
when (debug opts || "--debug" `elem` lateflags) $ do
105+
err $ "docopts: " ++ ppShow dopts ++ "\n" ++ ppShow opts ++ "\n"
107106
when (help opts) $ putStrLn (usage docoptpatterns) >> exitSuccess
108107
-- try to report some errors docopts misses
109108
case (lateflags, args) of

0 commit comments

Comments
 (0)