MarcWeber / hasktags

Produces ctags "tags" and etags "TAGS" files for Haskell programs
Other
131 stars 33 forks source link

Compilation error against `0.71.x` #63

Open amilkov3 opened 5 years ago

amilkov3 commented 5 years ago

Via a stack install

src/Main.hs:76:25: error:
    • Couldn't match type ‘[Char]’ with ‘TagsFile’
      Expected type: Parser TagsFile
        Actual type: Parser String
    • In the expression:
        strOption
        $ long "output"
          <>
            long "file"
            <>
              short 'o'
              <>
                short 'f'
                <>
                  metavar "FILE|-"
                  <>
                    value (TagsFile "tags" "TAGS")
                    <>
                      showDefault
                      <>
                        help
                          "output to given file, instead of using the default names. '-' writes to stdout"
      In an equation for ‘outputRedirection’:
          outputRedirection
            = strOption
              $ long "output"
                <>
                  long "file"
                  <>
                    short 'o'
                    <>
                      short 'f'
                      <>
                        metavar "FILE|-"
                        <>
                          value (TagsFile "tags" "TAGS")
                          <>
                            showDefault
                            <>
                              help
                                "output to given file, instead of using the default names. '-' writes to stdout"
      In an equation for ‘options’:
          options
            = Options <$> mode <*> many optionFiles <*> files
                where
                    mode :: Parser Mode
                    mode
                      = Mode <$> (ctags <|> etags <|> bothTags) <*> extendedCtag
                        <*> appendTags
                        <*> outputRedirection
                        <*> cacheData
                        <*> followSymlinks
                        <*> suffixes
                        <*> absoluteTagPaths
                    ctags :: Parser Tags
                    ctags
                      = flag Both Ctags
                        $ long "ctags" <> short 'c' <> help "generate CTAGS file (ctags)"
                    ....

    /tmp/stack12962/hasktags-0.71.0/src/Main.hs:77:10: error:
        • Couldn't match type ‘TagsFile’ with ‘[Char]’
          Expected type: Mod OptionFields String
            Actual type: Mod OptionFields TagsFile
        • In the second argument of ‘($)’, namely
            ‘long "output"
             <>
               long "file"
               <>
                 short 'o'
                 <>
                   short 'f'
                   <>
                     metavar "FILE|-"
                     <>
                       value (TagsFile "tags" "TAGS")
                       <>
                         showDefault
                         <>
                           help
                             "output to given file, instead of using the default names. '-' writes to stdout"’
          In the expression:
            strOption
            $ long "output"
              <>
                long "file"
                <>
                  short 'o'
                  <>
                    short 'f'
                    <>
                      metavar "FILE|-"
                      <>
                        value (TagsFile "tags" "TAGS")
                        <>
                          showDefault
                          <>
                            help
                              "output to given file, instead of using the default names. '-' writes to stdout"
          In an equation for ‘outputRedirection’:
              outputRedirection
                = strOption
                  $ long "output"
                    <>
                      long "file"
                      <>
                        short 'o'
                        <>
                          short 'f'
                          <>
                            metavar "FILE|-"
                            <>
                              value (TagsFile "tags" "TAGS")
                              <>
                                showDefault
                                <>
                                  help
                                    "output to given file, instead of using the default names. '-' writes to stdout"
jhenahan commented 5 years ago

I can't seem to reproduce this. I'm afraid I don't know enough about stack to determine the source of this. Do you maybe have a global Stack config that might be applying some unusual pragmas or pinning some dependencies?

osheari1 commented 5 years ago

I am also getting this error with lts-9.0 by running stack install hasktags --resolver lts-9.0

jhenahan commented 5 years ago

I’ll look at the diffs for 9.0-9.21 (the LTS I test against), but I’m not sure I can realistically support arbitrary LTS versions. Diff is at https://www.stackage.org/diff/lts-9.0/lts-9.21. I’ll see what I can do, but PRs are also welcome as long as they don’t break other explicitly supported versions.