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

filepath: exporting isWindows breaks hlint #38

Open
rimmington opened this issue Aug 8, 2016 · 1 comment
Open

filepath: exporting isWindows breaks hlint #38

rimmington opened this issue Aug 8, 2016 · 1 comment

Comments

@rimmington
Copy link

Using GHCJS with Stack like so:

resolver: lts-3.9
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2
compiler-check: match-exact
setup-info:
  ghcjs:
    source:
      ghcjs-0.2.0.20151230.3_ghc-7.10.2:
        url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz"

I cannot install hlint. It looks like the filepath patch is additionally exporting isWindows, which causes the following error:

    Configuring hlint-1.9.21...
    Building hlint-1.9.21...
    Preprocessing library hlint-1.9.21...
    [ 1 of 45] Compiling Test.Util        ( src/Test/Util.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/Test/Util.js_o )
    [ 2 of 45] Compiling Test.InputOutput ( src/Test/InputOutput.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/Test/InputOutput.js_o )
    [ 3 of 45] Compiling HSE.Type         ( src/HSE/Type.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/HSE/Type.js_o )
    [ 4 of 45] Compiling HSE.FreeVars     ( src/HSE/FreeVars.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/HSE/FreeVars.js_o )
    [ 5 of 45] Compiling HSE.Util         ( src/HSE/Util.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/HSE/Util.js_o )
    [ 6 of 45] Compiling HSE.Match        ( src/HSE/Match.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/HSE/Match.js_o )
    [ 7 of 45] Compiling HSE.Scope        ( src/HSE/Scope.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/HSE/Scope.js_o )
    [ 8 of 45] Compiling HsColour         ( src/HsColour.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/HsColour.js_o )
    [ 9 of 45] Compiling Parallel         ( src/Parallel.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/Parallel.js_o )
    [10 of 45] Compiling Paths_hlint      ( .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/autogen/Paths_hlint.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/Paths_hlint.js_o )
    [11 of 45] Compiling Util             ( src/Util.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/Util.js_o )
    [12 of 45] Compiling CmdLine          ( src/CmdLine.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.4.0_ghcjs/build/CmdLine.js_o )

    /tmp/stack24478/hlint-1.9.21/src/CmdLine.hs:67:12:
        Ambiguous occurrence ‘isWindows’
        It could refer to either ‘System.FilePath.isWindows’,
                                 imported from ‘System.FilePath’ at src/CmdLine.hs:13:1-22
                                 (and originally defined in ‘System.FilePath.Current’)
                              or ‘System.Info.Extra.isWindows’,
                                 imported from ‘System.Info.Extra’ at src/CmdLine.hs:18:1-24```
@benjamin-hodgson
Copy link

benjamin-hodgson commented Sep 16, 2016

I've hit this issue too, when trying to build Idris. The Idris package has its own internal isWindows utility, and later it's used in a module which also imports System.FilePath.

I'll ask the Idris devs whether they mind addressing the issue once-off (by importing only the required names from System.FilePath) but as Neil Mitchell points out it's probably better for GHCJS not to patch System.FilePath's exported names.

What's isWindows used for? Would you be open to a pull request to move it to somewhere internal to GHCJS?

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

2 participants