fpco / stackage-view

MIT License
21 stars 10 forks source link

Compilation error [client/React/Ace.hs:93:31]: Overlapping instances for Eq JSString arising from a use of ‘/=’ #9

Closed dimchansky closed 9 years ago

dimchansky commented 9 years ago

Compilation failed with the following output:

[ 7 of 13] Compiling React.Ace        ( client/React/Ace.hs, client/React/Ace.js_o )

client/React/Ace.hs:93:31:
    Overlapping instances for Eq JSString arising from a use of ‘/=’
    Matching instances:
      instance Eq (JSRef a) -- Defined in ‘GHCJS.Prim’
      instance Eq JSString -- Defined at client/React/Ace.hs:248:10
    In the first argument of ‘when’, namely ‘(code /= code')’
    In a stmt of a 'do' block:
      when (code /= code') (setValue editor code)
    In the expression:
      do { code' <- getValue editor;
           when (code /= code') (setValue editor code);
           stateStartLine <- getStartLine props;
           stateStartCol <- getStartCol props;
           .... }

server/Handler/Home.hs:17:5:
    Exception when trying to run compile-time code:
      The GHCJS process failed with exit code 1.
    Code: ghcjsFileDev
            development
            ["-iclient", "-ishared", "-XCPP", "-XTemplateHaskell", ....]
            "app/Client.hs"
    In the splice:
      $(ghcjsFileDev
          development
          ["-iclient", "-ishared", "-XCPP", ....]
          "app/Client.hs")
cabal: Error: some packages failed to install:
stackage-view-0.0.1 failed during the building phase. The exception was:
ExitFailure 1
gcharnock commented 9 years ago

I had the same problem. If you comment out the instance defined in client/React/Ace.hs and it seems to build. My guess is that ghsjs-prim added some new instances to their JSRefs?

--instance Eq JSString where
--    (==) = stringEq

(I'm not a developer. Maybe one could offer more insight?)

chrisdone commented 9 years ago

Ah, seems those orphans can be removed then. I'll remove.