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

Compilation error against 0.71.x #63

Open
amilkov3 opened this issue Oct 21, 2018 · 3 comments
Open

Compilation error against 0.71.x #63

amilkov3 opened this issue Oct 21, 2018 · 3 comments

Comments

@amilkov3
Copy link

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
Copy link
Collaborator

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
Copy link

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

@jhenahan
Copy link
Collaborator

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.

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

No branches or pull requests

3 participants