haskell / criterion

A powerful but simple library for measuring the performance of Haskell code.
http://www.serpentine.com/criterion
BSD 2-Clause "Simplified" License
501 stars 86 forks source link

Use default value for `regressions` when creating `config` #245

Closed RyanGlScott closed 3 years ago

RyanGlScott commented 3 years ago

Previously, the config function would ignore the value of regressions that specified (e.g., via the Config argument of defaultMain). Since --regressions is an argument that is allowed to be passed multiple times, it's somewhat awkward to specify a default argument for it. I adopt a similar approach to what the old arguments1 function in optparse-applicative did (see https://github.com/pcapriotti/optparse-applicative/commit/700e07b0751d02fec938af67d1f917e60974a601).

Fixes #244.