docopt / docopt.hs

A command-line interface description language and parser that will make you smile
http://docopt.org/
MIT License
119 stars 24 forks source link

docopt does not compile with ghc-8.8.2 #33

Closed peti closed 3 years ago

peti commented 4 years ago
[ 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 commented 4 years ago

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

iphydf commented 4 years ago

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

ju1m commented 3 years ago

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

rtxanson commented 3 years ago

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

extra-deps:
- git: git@github.com:gelisam/docopt.hs
  commit: 16dc7bc596c0ea4fa4466b12f474b1abfa72c885
simonmichael commented 3 years ago

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 commented 3 years ago

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.