hi icon indicating copy to clipboard operation
hi copied to clipboard

`cabal install hi` fails due to `optparse-applicative`

Open andreasabel opened this issue 4 years ago • 0 comments

This fails:

cabal install hi

This works:

$ cabal install hi --constraint="optparse-applicative<0.16"

Suggestions:

  • quick fix: make a revision on hackage adding the missing upper bound
  • long-term fix: fix the error and switch to optparse-applicative >= 0.16

Further details

Error:

cabal install hi
...
[11 of 12] Compiling Hi.Cli           ( src/Hi/Cli.hs, dist/build/hi/hi-tmp/Hi/Cli.o )

src/Hi/Cli.hs:48:30: error:
    • Couldn't match expected type ‘ParseError’
                  with actual type ‘Maybe String -> ParseError’
    • Probable cause: ‘ShowHelpText’ is applied to too few arguments
      In the third argument of ‘parserFailure’, namely ‘ShowHelpText’
      In the second argument of ‘($)’, namely
        ‘parserFailure pprefs pinfo ShowHelpText mempty’
      In the expression:
        handleParseResult . Failure
          $ parserFailure pprefs pinfo ShowHelpText mempty
   |
48 |   parserFailure pprefs pinfo ShowHelpText mempty
   |                              ^^^^^^^^^^^^
cabal: Failed to build exe:hi from hi-1.2.0.2.

See similar issue at https://github.com/commercialhaskell/stack/issues/5379.

andreasabel avatar Feb 18 '21 09:02 andreasabel