HDirect (CVS version) - some bugs
Mike Thomas
miketh at brisbane.paradigmgeo.com
Wed Nov 7 18:42:38 EST 2001
Hi there.
Attached is a small zip file containing some idl and header files which are
meant to define an interface to Frank Warmerdam's map projection library.
The problems can be reproduced by unzipping, going to the top level
directory and running "make". I am using Windows NT GHC 5.02 and CVS
version of HDirect.
1. The C stub code ("Proj.c") generated for structures defined in the idl
with lower-case leading characters has upper case leading characters eg:
projXY in the IDL is converted to ProjXY. I have worked around this by
including a header file ("nameconvert.h") with macros which change the names
back to those used in the library headers, but this is messy.
2. The Haskell code ("Proj.hs") contains some strange definitions to do with
a datatype "IHC_TAG_0", which causes the errors below when compiled. The
datatype is associated with a function which takes another function as an
argument:
void pj_set_finder( const char *(*)(const char *) );
Cheers
Mike Thomas
--------------- IHC_TAG_0 error messages ----------------
ghc -c -package lang -package com -fglasgow-exts -fvia-C Proj.hs -o
proj_hs.o
Proj.hs:338:
Couldn't match
`PrelMaybe.Maybe (PrelBase.Char -> PrelIOBase.IO PrelBase.Char)'
against
`IHC_TAG_0'
Expected type: PrelMaybe.Maybe
(PrelBase.Char -> PrelIOBase.IO PrelBase.Char)
Inferred type: IHC_TAG_0
In the third argument of `HDirect.marshallref', namely `arg10'
In a 'do' expression pattern binding:
arg10 <- HDirect.marshallref (HDirect.allocBytes (PrelReal.toInt
sizeofI
HC_TAG_0))
(HDirect.writeunique
(HDirect.allocBytes (P
relReal.toInt sizeofIHC_TAG_0))
writeIHC_TAG_0)
arg10
make: *** [proj_hs.o] Error 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win32hello.zip
Type: application/x-zip-compressed
Size: 18611 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20011108/6649c27a/win32hello.bin
More information about the Glasgow-haskell-bugs
mailing list