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

Tests fail to build with GHCJS #48

Open
phadej opened this issue Jun 28, 2019 · 1 comment
Open

Tests fail to build with GHCJS #48

phadej opened this issue Jun 28, 2019 · 1 comment

Comments

@phadej
Copy link

phadej commented Jun 28, 2019

[1 of 4] Compiling TestUtil         ( test/TestUtil.hs, /code/other-haskell/extra/dist-newstyle/build/x86_64-linux/ghcjs-8.4.0.1/extra-1.6.17/t/extra-test/build/extra-test/extra-test-tmp/TestUtil.js_o )

test/TestUtil.hs:10:6: error:
    Conflicting exports for ‘isWindows’:
       ‘module X’ exports ‘X.isWindows’
         imported from ‘System.FilePath’ at test/TestUtil.hs:33:1-27
         (and originally defined in ‘System.FilePath.Posix’)
       ‘module X’ exports ‘X.isWindows’
         imported from ‘System.Info.Extra’ at test/TestUtil.hs:34:1-29
   |
10 |     ,module X

This is no biggie, and I can workaround it easy by having an override

      extra          = dontCheckGHCJS super.extra;

but if it can be fixed, all the better!

@ndmitchell
Copy link
Owner

I think GHCJS adding extra functions to a standard library is not a particularly smart move... They should have added isWindows to System.Info on all versions of Haskell instead.

That said, I'd accept a patch that made ifdef GHCJS then don't define isWindows but reexport the filepath one that GHCJS defines. That should give you compatibility and also work with everything that depends on extra. PR welcome (since I have no way of testing it), but happy to sketch out a roughly working patch if that helps.

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