haskell / criterion

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

WIP Update optparse-applicative to master and use prettyprinter library instead #241

Closed newhoggy closed 1 year ago

RyanGlScott commented 3 years ago

Thanks for the PR, @newhoggy. I'm a bit unclear on what the purpose of this PR is. Is the goal to replace the use of ansi-wl-pprint with prettyprinter? If so, then optparse-applicative (a dependency of criterion) will need to be patched first, as its footerDoc function (which criterion uses) makes use of ansi-wl-pprint's Doc type rather that prettyprinter's Doc.

The PR title mentions something about optparse-applicative master, but as far as I can tell, the master branch of optparse-applicative still uses ansi-wl-pprint, and the PR itself doesn't change the version of optparse-applicative being used. As things stand, I'm uncertain how this is meant to work.

Bodigrim commented 3 years ago

@RyanGlScott I think this is a counterpart of https://github.com/pcapriotti/optparse-applicative/pull/428

RyanGlScott commented 1 year ago

optparse-applicative recently made two releases that support prettyprinter:

I think we should follow suit in criterion. I'll prepare a series of two PRs (based on the changes in #241 and #242) such that we will have:

RyanGlScott commented 1 year ago

See #275 (which widens optparse-applicative support) and #276 (which requires optparse-applicative-0.18.* as the minimum).

RyanGlScott commented 1 year ago

I've released criterion-1.6.1.0 and criterion-1.6.2.0 to Hackage, which include the changes from #275 and #276, respectively. As such, this PR has been superseded, so I'll close this.