Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Failed to install not-gloss-examples #18

Open
ghorn opened this issue Jan 7, 2016 · 0 comments
Open

Failed to install not-gloss-examples #18

ghorn opened this issue Jan 7, 2016 · 0 comments

Comments

@ghorn
Copy link
Owner

ghorn commented Jan 7, 2016

This comment from https://github.com/vladfi1 was pasted from a deleted repo:

Using ghc-7.8.4, cabal-install not-gloss-examples fails with

Preprocessing executable 'not-gloss-game' for not-gloss-examples-0.5.0...
[1 of 1] Compiling Main             ( src/Play.hs, dist/dist-sandbox-1a1c9336/build/not-gloss-game/not-gloss-game-tmp/Main.o )

src/Play.hs:32:42:
    Ambiguous occurrence ‘lookAt’
    It could refer to either ‘Linear.lookAt’,
                             imported from ‘Linear’ at src/Play.hs:6:1-13
                             (and originally defined in ‘Linear.Projection’)
                          or ‘Graphics.UI.GLUT.lookAt’,
                             imported from ‘Graphics.UI.GLUT’ at src/Play.hs:10:1-64
                             (and originally defined in ‘OpenGL-2.10.0.1:Graphics.Rendering.OpenGL.GLU.Matrix’)

If I do cabal get not-gloss-examples and then cabal install inside the source dir, I strangely get a different error!

Preprocessing executable 'not-gloss-simulate' for not-gloss-examples-0.5.0...
[1 of 1] Compiling Main             ( src/Simulate.hs, dist/dist-sandbox-7dc9706d/build/not-gloss-simulate/not-gloss-simulate-tmp/Main.o )

src/Simulate.hs:24:77:
    Couldn't match expected type ‘VisObject Double’
                with actual type ‘[(V3 a0, Color)] -> VisObject a0’
    Probable cause: ‘line’ is applied to too few arguments
    In the expression: line
    In the first argument of ‘(++)’, namely
      ‘[axes, box, ellipsoid, sphere, ....]’

src/Simulate.hs:39:20:
    Couldn't match expected type ‘Maybe a’
                with actual type ‘[(V3 Double, Color)]’
    Relevant bindings include
      line :: [(V3 a, Color)] -> VisObject a
        (bound at src/Simulate.hs:39:5)
    In the second argument of ‘($)’, namely
      ‘zip
         trail
         (map (\ a -> makeColor 1 0 0 a) (linspace 1 0 (length trail)))’
    In the expression:
      Line'
      $ zip
          trail
          (map (\ a -> makeColor 1 0 0 a) (linspace 1 0 (length trail)))

Any idea what's going on?

Edit: I think the only reason for the different error messages is that cabal decides to build the executables in different orders, and thus encounters different errors before stopping.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant