haskellcabalgloss

Cabal error running with Gloss


I'm trying to install gloss on my computer to make a graphic game and I followed a tutorial, with these steps:

1) First I run this command: cabal install gloss==1.8.* . I want gloss 1.8.* because I found a game made with this version of gloss, and I understand that it is recommended to use the same version of gloss with which the game was made it. I have this on the cmd: installing gloss

2)Next, once gloss is installed, we have to tell cabal that our package is allowed to use it. I founnd the line in pong.cabal that mentions build-depends and change it to the following:

build-depends: base >=4.7 && <4.8, gloss==1.8.*

3) Finally, I wanted to run my .hs file(which contain the code to make a "nice window" with a circle) with the command: cabal run; the result of this command:

running .hs file

I don't understand why cabal can't find the gloss 1.8*. Anyone can help me with this problem?


Solution

  • Gloss 1.8.2.2 requires base 4.7.* (see the cabal file). The release notes for GHC 7.8.3 state that it comes with base 4.7.0.0.