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

hpack-convert won't build with LTS11.4 #18

Open
sebeaumont opened this issue Apr 12, 2018 · 10 comments
Open

hpack-convert won't build with LTS11.4 #18

sebeaumont opened this issue Apr 12, 2018 · 10 comments

Comments

@sebeaumont
Copy link

$ stack install hpack-convert
Using latest snapshot resolver: lts-11.4
/private/var/folders/30/9xrf_jtx7618zqb1pyd1wyh40000gp/T/stack40077/hpack-convert-1.0.1/src/Hpack/Util.hs:106:21: error:
    • Couldn't match type ‘[[FilePath]]’ with ‘([[FilePath]], b0)’
      Expected type: IO ([[FilePath]], b0)
        Actual type: IO [[FilePath]]
    • In the second argument of ‘(<$>)’, namely
        ‘globDir compiledPatterns dir’
      In the first argument of ‘(>>=)’, namely
        ‘(fst <$> globDir compiledPatterns dir)’
      In a stmt of a 'do' block:
        files <- (fst <$> globDir compiledPatterns dir)
                   >>= mapM removeDirectories
    |
106 |   files <- (fst <$> globDir compiledPatterns dir) >>= mapM removeDirectories
    |                     ^^^^^^^^^^^^^^^^^^^^^
@tebello-thejane
Copy link

It would appear that the type signature for globDir changed in Glob-0.9.0.

Old: https://hackage.haskell.org/package/Glob-0.8.0/docs/System-FilePath-Glob.html#v:globDir

globDir :: [Pattern] -> FilePath -> IO ([[FilePath]], [FilePath]) 

New: https://hackage.haskell.org/package/Glob-0.9.0/docs/System-FilePath-Glob.html#v:globDir

globDir :: [Pattern] -> FilePath -> IO [[FilePath]] 

This appears to be a simple job for -XCPP, assuming that nothing else is broken.

@tebello-thejane
Copy link

Here's a supposed fix: #16

@ifduyue
Copy link

ifduyue commented Nov 17, 2018

Any updates on this?

@andrewufrank
Copy link

I observed the same error - with ghc 8.4.4
please fix!

@CedricLeong
Copy link

I'm getting the same error on Windows 10

@peterstorm
Copy link

Any update for this? Doesn't work on newest resolver either, as far as my tries go :(

@pigam
Copy link

pigam commented Dec 17, 2019

Interested as well for #16 integration.

@wbadart
Copy link

wbadart commented Mar 27, 2020

Looks like we've still got this issue on LTS-15.5.

@chansey97
Copy link

chansey97 commented Feb 19, 2024

At the moment the hpack-convert won't build with the latest GHC (such as 9.8.1, ghc-9.4.8), and the official repository doesn't provide a windows binary release. This prevents you from using hpack-convert on windows.

You might built it via older snapshot by stack, but this require downgrading the stack version, which is annoying.

For ease of use, a windows binary is provided here.

It built on windows (lts-15.5) successfully and it works well, using @kindaro 's fork: kindaro@fa98909

Related links: #18 #16

@sebeaumont
Copy link
Author

Please close this if everyone's happy -- (I can't recall what I was doing in 2018) and I don't use stack anymore these days anyhow.

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

9 participants