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

Fails to compile with optparse-applicative-0.17.0.0 #258

Closed mrkkrp closed 2 years ago

mrkkrp commented 2 years ago
Criterion/Main/Options.hs:225:7: error:
    • Couldn't match expected type ‘Chunk Doc’
                  with actual type ‘[(Doc, Doc)] -> Chunk Doc’
    • Probable cause: ‘tabulate’ is applied to too few arguments
      In the second argument of ‘($)’, namely
        ‘tabulate [(text n, text d) | (n, (_, d)) <- map f measureKeys]’
      In the expression:
        fmap (text "Regression metrics (for use with --regress):" .$.)
          $ tabulate [(text n, text d) | (n, (_, d)) <- map f measureKeys]
      In an equation for ‘regressionHelp’:
          regressionHelp
            = fmap (text "Regression metrics (for use with --regress):" .$.)
                $ tabulate [(text n, text d) | (n, (_, d)) <- map f measureKeys]
            where
                f k = (k, measureAccessors M.! k)
    |
225 |       tabulate [(text n,text d) | (n,(_,d)) <- map f measureKeys]
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Criterion/Main/Options.hs:225:16: error:
    • Couldn't match expected type ‘Int’
                  with actual type ‘[(Doc, Doc)]’
    • In the first argument of ‘tabulate’, namely
        ‘[(text n, text d) | (n, (_, d)) <- map f measureKeys]’
      In the second argument of ‘($)’, namely
        ‘tabulate [(text n, text d) | (n, (_, d)) <- map f measureKeys]’
      In the expression:
        fmap (text "Regression metrics (for use with --regress):" .$.)
          $ tabulate [(text n, text d) | (n, (_, d)) <- map f measureKeys]
    |
225 |       tabulate [(text n,text d) | (n,(_,d)) <- map f measureKeys]
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Please consider making a revision on Hackage.

RyanGlScott commented 2 years ago

I've applied Hackage revisions to all affected versions of criterion. I have also submitted #259 to add proper optparse-applicative-0.17.* support.

RyanGlScott commented 2 years ago

I've uploaded criterion-1.5.13.0 to Hackage with the changes from #259.