1

Haskell Community.

I am a newbie in Haskell, can only implement simple Haskell functions.

I tried out one Haskell game program that was open source. While running it, GHC gave the following errors:

HexDame.hs:1:1: error: Failed to load interface for ‘Graphics.Gloss’

    Perhaps you meant
    Graphics.GL (from OpenGLRaw-3.1.0.0)
   Graphics.GL.HP (from OpenGLRaw-3.1.0.0)
   Graphics.GL.NV (from OpenGLRaw-3.1.0.0)
   Use -v to see a list of the files searched for.

HexDame.hs:2:1: error: Failed to load interface for ‘Graphics.Gloss.Interface.Pure.Game’

    Use -v to see a list of the files searched for.

HexDame.hs:3:1: error: Failed to load interface for ‘Graphics.Gloss.Data.Extent’

     Use -v to see a list of the files searched for.

I am unsure whether Gloss is installed or not. I am using GHC on Windows on a proxy network. The 'cabal update' solution is also not working. For other information, I had downloaded the entire Haskell package from the website, so I presume it includes all necessary packages, including GLUT.

Please suggest solutions.

Arghya Dutta
  • 105
  • 1
  • 8
  • 1
    You can (try to) install Gloss via `cabal install gloss`. N.B. it is usually best to use the glfw backend via `cabal install gloss -fglfw`. – Thomas M. DuBuisson Oct 18 '16 at 16:20
  • can you give the specific `cabal` error? If the `cabal` command itself is being found, but `cabal update` is failing, I suspect you need to set the environment variable `HTTP_PROXY`. – ja. Oct 18 '16 at 22:55
  • @ja. I don't think he has used Cabal. He instead used ghc to compile a single-file program that requires gloss. – Thomas M. DuBuisson Oct 19 '16 at 05:04

0 Answers0