problem compiling OpenGL/.../Extensions.hs with GHC version 6.0
Andres Loeh
andres at cs.uu.nl
Sat May 31 10:39:04 EDT 2003
Hi.
The problem that Ralf Hinze reported with compiling GHC version 6.0
seems to be caused by the following:
The problematic line in the source file where the parse error is reported
reads (this is OpenGL/Graphics/Rendering/OpenGL/GL/Extensions.hs):
foreign import CALLCONV unsafe GET_PROC_ADDRESS glXGetProcAddressARB ::
CString -> IO (FunPtr a)
The CPP var GET_PROC_ADDRESS is set in the Makefile in OpenGL in the line:
SRC_HC_OPTS += -DCALLCONV=ccall '-DGET_PROC_ADDRESS="glXGetProcAddressARB"'
The problem (that can be witnessed by calling ghc with the option -v) is
that in calling the C preprocessor, the double quotes around the value
of GET_PROC_ADDRESS, which are syntactically necessary, are no longer
present. The problem can be fixed by quoting the double quotes once more,
i.e. by saying
SRC_HC_OPTS += -DCALLCONV=ccall '-DGET_PROC_ADDRESS=\"glXGetProcAddressARB\"'
However, this is a change in behaviour compared to earlier versions of
ghc that seems undesireable to me ...
One more thing: during compilation, ghc-inplace is called with the option
-Rghc-timing. I do not see it report timing-related messages, though.
Best,
Andres
--
Andres Loeh, Universiteit Utrecht
mailto:andres at cs.uu.nl mailto:mail at andres-loeh.de
http://www.andres-loeh.de
More information about the Glasgow-haskell-bugs
mailing list