snoyberg / mono-traversable

Type classes for mapping, folding, and traversing monomorphic containers
153 stars 63 forks source link

Can't use classy-prelude with GHCJS #102

Closed mrijkeboer closed 8 years ago

mrijkeboer commented 8 years ago

I would like to use classy-prelude with GHCJS, but unfortunately I can't get classy-prelude to compile with GHCJS. I get the following error:

--  While building package basic-prelude-0.5.2 using:
      /home/user/.stack/setup-exe-cache/x86_64-openbsd/setup-Simple-Cabal-1.22.8.0-ghcjs-0.2.0_ghc-7.10.3 --builddir=.stack-work/dist/x86_64-openbsd/Cabal-1.22.8.0_ghcjs build --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/user/Checkouts/test/client/.stack-work/logs/basic-prelude-0.5.2.log

    Configuring basic-prelude-0.5.2...
    Building basic-prelude-0.5.2...
    Preprocessing library basic-prelude-0.5.2...

    /tmp/stack59336/basic-prelude-0.5.2/BasicPrelude.hs:150:18:
        Could not find module `Safe'
        Perhaps you haven't installed the "js" libraries for package `safe-0.3.9@safe_BjI3SxrMPD5F5AZ3gJB9mt'?
        Use -v to see a list of the files searched for.

I use the following stack.yaml:

resolver: lts-6.4

packages:
- '.'
extra-deps: []
extra-include-dirs:
- /usr/local/include
extra-lib-dirs:
- /usr/local/lib
flags: {}
extra-package-dbs: []
compiler: ghcjs-0.2.0.20160414_ghc-7.10.3
compiler-check: match-exact
setup-info:
  ghcjs:
    source:
      ghcjs-0.2.0.20160414_ghc-7.10.3:
        url: https://s3.amazonaws.com/ghcjs/ghcjs-0.2.0.20160414_ghc-7.10.3.tar.gz
        sha1: 6d6f307503be9e94e0c96ef1308c7cf224d06be3
snoyberg commented 8 years ago

I just went through the same steps, and I was able to install it. Perhaps try running the following?

stack exec -- ghcjs-pkg unregister safe

And see if that resets things enough to work.

mrijkeboer commented 8 years ago

The reset didn't work, but deleting .ghcjs and .stack and than stack setup && stack build worked, so it seems it was a local issue. Thanks for your help.

snoyberg commented 8 years ago

No problem. This is the first I've heard of this library being used with ghcjs, exciting!

On Tue, Jul 12, 2016, 4:49 PM Martijn Rijkeboer notifications@github.com wrote:

Closed #102 https://github.com/snoyberg/mono-traversable/issues/102.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/snoyberg/mono-traversable/issues/102#event-720157464, or mute the thread https://github.com/notifications/unsubscribe/AADBB4ww1gYuk_id3fOWHillHFDL-3rZks5qU5txgaJpZM4JJrNw .