Skip to content

Commit c620366

Browse files
committed
Add argument to set num of threads, default 1
1 parent 86fe4eb commit c620366

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

exe/Arguments.hs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ data Arguments = Arguments
3636
-- them to just change the name of the exe and still work.
3737
, argsDebugOn :: Bool
3838
, argsLogFile :: Maybe String
39-
39+
, argsThread :: Int
4040
}
4141

4242
getArguments :: String -> IO Arguments
@@ -73,6 +73,13 @@ arguments exeName = Arguments
7373
<> metavar "LOGFILE"
7474
<> help "File to log to, defaults to stdout"
7575
))
76+
<*> option auto
77+
(short 'j'
78+
<> help "Number of threads (0: automatic)"
79+
<> metavar "NUM"
80+
<> value 1
81+
<> showDefault
82+
)
7683

7784
-- ---------------------------------------------------------------------
7885
-- Set the GHC libdir to the nix libdir if it's present.

0 commit comments

Comments
 (0)