Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docopt does not compile with ghc-8.8.2 #33

Closed
peti opened this issue Feb 28, 2020 · 6 comments · Fixed by #34
Closed

docopt does not compile with ghc-8.8.2 #33

peti opened this issue Feb 28, 2020 · 6 comments · Fixed by #34

Comments

@peti
Copy link

peti commented Feb 28, 2020

[ 6 of 10] Compiling System.Console.Docopt.Public ( System/Console/Docopt/Public.hs, dist/build/System/Console/Docopt/Public.o )

System/Console/Docopt/Public.hs:195:17: error:
    • Could not deduce (MonadFail m) arising from a use of ‘fail’
      from the context: Monad m
        bound by the type signature for:
                   getFirstArg :: forall (m :: * -> *).
                                  Monad m =>
                                  Arguments -> Option -> m String
        at System/Console/Docopt/Public.hs:193:1-57
      Possible fix:
        add (MonadFail m) to the context of
          the inferred type of failure :: m a
          or the type signature for:
               getFirstArg :: forall (m :: * -> *).
                              Monad m =>
                              Arguments -> Option -> m String
    • In the expression: fail $ "no argument given: " ++ show opt
      In an equation for ‘failure’:
          failure = fail $ "no argument given: " ++ show opt
      In the expression:
        let failure = fail $ "no argument given: " ++ show opt
        in
          case opt `M.lookup` args of
            Nothing -> failure
            Just val
              -> case val of
                   MultiValue vs -> ...
                   Value v -> return v
                   _ -> failure
    |
195 |   let failure = fail $ "no argument given: " ++ show opt
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 7 of 10] Compiling System.Console.Docopt.UsageParse ( System/Console/Docopt/UsageParse.hs, dist/build/System/Console/Docopt/UsageParse.o )

System/Console/Docopt/UsageParse.hs:7:1: warning: [-Wunused-imports]
    The import of ‘dropWhile’ from module ‘Data.List’ is redundant
  |
7 | import           Data.List (nub, sortBy, maximumBy, dropWhile, dropWhileEnd)
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 8 of 10] Compiling System.Console.Docopt.QQ ( System/Console/Docopt/QQ.hs, dist/build/System/Console/Docopt/QQ.o )

System/Console/Docopt/QQ.hs:59:25: error:
    • No instance for (MonadFail ((->) String))
        arising from a use of ‘fail’
    • In the first argument of ‘(.)’, namely ‘fail’
      In the expression: fail . (++ " context unsupported")
      In an equation for ‘unsupported’:
          unsupported = fail . (++ " context unsupported")
   |
59 |     where unsupported = fail . (++ " context unsupported")
   |                         ^^^^
@arrowd
Copy link

arrowd commented Mar 26, 2020

This is easily fixable. Can we please get a new release supporting GHC 8.8?

@iphydf
Copy link

iphydf commented May 3, 2020

stack-hpc-coveralls can't be built for 8.8 before this is fixed (or it gets rid of docopt as a dependency).

@ju1m
Copy link

ju1m commented Oct 8, 2020

zerobin client can't be built for ghc-8.8 before this is fixed.

gelisam added a commit to gelisam/docopt.hs that referenced this issue Nov 3, 2020
@rtxanson
Copy link

rtxanson commented Nov 8, 2020

Thanks @gelisam! Throwing this in my stack.yaml for now.

extra-deps:
- git: git@github.com:gelisam/docopt.hs
  commit: 16dc7bc596c0ea4fa4466b12f474b1abfa72c885

@simonmichael
Copy link
Contributor

Pinging @ryanartecona - could you possibly merge #34 and release to Hackage ?

And thanks for docopt. I'm using it for https://hackage.haskell.org/package/quickbench, and it's a good fit - would prefer to keep using it if possible.

@ryanartecona
Copy link
Member

ryanartecona commented Dec 23, 2020

Sorry, all, for the lack of response here.

I initially wrote this library, but I haven't actively maintained it for years. I don't work in Haskell any more these days, and I don't even have a Haskell installation on my computer with which to build the library.

I don't want to remain a blocker to these maintenance changes getting merged and released, but I'd strongly prefer to do that by handing off the maintainer role to someone who can realistically fill it.

I will make a separate issue making this more visible (edit: #35), but if anyone on this thread is interested, please speak up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants