Skip to content

cabal install hi fails due to optparse-applicative #65

@andreasabel

Description

@andreasabel

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 commercialhaskell/stack#5379.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions