[HOpenGL] HOpenGL & GHC-5.02

Andre W B Furtado awfurtado@uol.com.br
Thu, 25 Oct 2001 03:12:36 -0200


This is a multi-part message in MIME format.

------=_NextPart_000_0018_01C15D02.E5B2C2A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I was trying to compile HOpenGL using GHC-5.02 in my windows98 platform. =
I still needed to use cygwin because otherwise I wouldn't have how to =
issue commands like "configure", "make depend", "make', ...

After some rearrangements, the last step ("make") gives me some warnings =
and errors concerning file GL_BinaryIO.hs, such as:

GL_BinaryIO.hs:21:
    Warning: Variable `hPutBufFull' is deprecated: renamed to hPutBuf

GL_BinaryIO.hs:21:
    Warning: Variable `hGetBufFull' is deprecated: renamed to hGetBuf

GL_BinaryIO.hs:193:
    Couldn't match `Addr' against `Ptr a'
        Expected type: Addr -> Int -> IO ()
        Inferred type: Ptr a -> Int -> IO ()
    In the application `hPutBufFull handle'
    In the first argument of `sizedInParam', namely
        `(hPutBufFull handle)'

GL_BinaryIO.hs:198:
    Couldn't match `IO (Ptr a)' against `t -> t1'
        Expected type: IO (Ptr a)
        Inferred type: t -> t1
    Probable cause: `malloc' is applied to too many arguments in the =
call
        (malloc (sizeOf x))
    In a 'do' expression pattern binding: buf <- malloc (sizeOf x)

I think implementation of module IOExts may have changed, and the file =
GL_BinaryIO.hs deals with its older version. I would like to ask three =
questions then:

1. Is it worth trying to solve this problem, or will I find a lot of =
other similar problems?
2. If it is, how can I solve it?
3. If it is not, is there another way to compile HOpenGL using GHC-5.02 =
under a Windows98 platform? I know Sven is working on this, but is there =
a reasonable solution by now?

Thanks,
-- Andre

------=_NextPart_000_0018_01C15D02.E5B2C2A0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I was trying to compile HOpenGL using =
GHC-5.02 in=20
my windows98 platform. I still needed to use cygwin because otherwise I =
wouldn't=20
have how to issue commands like "configure", "make depend", "make',=20
...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>After some rearrangements, the last =
step ("make")=20
gives me some warnings and errors concerning file GL_BinaryIO.hs, such=20
as:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial =
size=3D2>GL_BinaryIO.hs:21:<BR>&nbsp;&nbsp;&nbsp; Warning:=20
Variable `hPutBufFull' is deprecated: renamed to hPutBuf</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>GL_BinaryIO.hs:21:<BR>&nbsp;&nbsp;&nbsp; Warning:=20
Variable `hGetBufFull' is deprecated: renamed to hGetBuf</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial =
size=3D2>GL_BinaryIO.hs:193:<BR>&nbsp;&nbsp;&nbsp; Couldn't=20
match `Addr' against `Ptr =
a'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Expected type: Addr -&gt; Int -&gt; IO=20
()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inferred type: Ptr a =
-&gt; Int=20
-&gt; IO ()<BR>&nbsp;&nbsp;&nbsp; In the application `hPutBufFull=20
handle'<BR>&nbsp;&nbsp;&nbsp; In the first argument of `sizedInParam',=20
namely<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; `(hPutBufFull=20
handle)'</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>GL_BinaryIO.hs:198:<BR>&nbsp;&nbsp;&nbsp; Couldn't=20
match `IO (Ptr a)' against `t -&gt;=20
t1'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Expected type: IO (Ptr =

a)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inferred type: t -&gt;=20
t1<BR>&nbsp;&nbsp;&nbsp; Probable cause: `malloc' is applied to too many =

arguments in the call<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
(malloc=20
(sizeOf x))<BR>&nbsp;&nbsp;&nbsp; In a 'do' expression pattern binding: =
buf=20
&lt;- malloc (sizeOf x)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>I think implementation of module IOExts may have changed,&nbsp;and =
the file=20
GL_BinaryIO.hs deals with its older version. I would like to ask three =
questions=20
then:</DIV>
<DIV>&nbsp;</DIV>
<DIV>1. Is it worth trying to solve this problem, or will I find a lot =
of other=20
similar problems?</DIV>
<DIV>2. If it is, how can I solve it?</DIV>
<DIV>3. If it is not, is there another way&nbsp;to compile HOpenGL using =

GHC-5.02 under a&nbsp;Windows98 platform? I know Sven is working on =
this, but is=20
there&nbsp;a reasonable solution by now?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks,</DIV>
<DIV>-- Andre</DIV></DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_0018_01C15D02.E5B2C2A0--