[Haskell] Compile error in GHC HEAD revision - nobody responding to bug report

Asfand Yar Qazi ayqazi at gmail.com
Mon Mar 13 17:46:18 EST 2006


I filed a bug report for a compile error in the latest GHC build, but nobody
has responded to it for 4 days.  I might as well try to fix it myself, but I'm
just a functional programming and Haskell beginner.

Here's the bug I filed:

Here's what the output of GHC says:

==fptools== make all -wr -f Makefile;
 in /home/ayqazi/src/packages/ghc/ghc-build/libraries/OpenAL
../../ghc/compiler/ghc-inplace -H32m -O -W -fno-warn-unused-matches
-fwarn-unused-imports -Wall -fffi -Iinclude '-#include "HsOpenAL.h"' -cpp
-DCALLCONV=ccall -ignore-package OpenAL   -package base  -package OpenGL
-fgenerics -split-objs    -c Sound/OpenAL/ALC/Capture.hs -o
Sound/OpenAL/ALC/Capture.o  -ohi Sound/OpenAL/ALC/Capture.hi

    Couldn't match expected type `NumSamples'
           against inferred type `Sound.OpenAL.Config.ALCint'
      Expected type: GettableStateVar NumSamples
      Inferred type: GettableStateVar Sound.OpenAL.Config.ALCint
    In the expression:
        makeGettableStateVar $ (getInteger (Just device) CaptureSamples)
    In the definition of `captureNumSamples':
        captureNumSamples device
                            = makeGettableStateVar $ (getInteger (Just
device) CaptureSamples)
make[2]: *** [Sound/OpenAL/ALC/Capture.o] Error 1
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/ayqazi/src/packages/ghc/ghc-build/libraries'
make: *** [build] Error 1
make: Leaving directory `/home/ayqazi/src/packages/ghc/ghc-build'

Here is where (I think) the problem lies (I added the line numbers):

File Capture.hs:

42: type NumSamples = ALCsizei

83: captureNumSamples :: Device -> GettableStateVar NumSamples
84: captureNumSamples device =
85:    makeGettableStateVar $ getInteger (Just device) CaptureSamples

ALCsizei is defined in a file Config.hs two directories below this point:

108: -- | Non-negatitve 32-bit binary integer size
109: type ALCsizei = HTYPE_ALCSIZEI

A C header file has the entry '#define HTYPE_ALCSIZEI Word32'.

Know what's happening?  Thanks

More information about the Haskell mailing list