I have attached a patch against the current CVS version of HSQL that
makes it possible to use HSQL in Hugs. The following things had to be
changed to achieve compatibility with Hugs:
- Hugs does not seem to support the stdcall calling convention, so
stdcall was changed to ccall in all foreign declarations. Does this
break things on Windows?
- Hugs does not have the Foreign.Concurrent module, so I changed
OSBC.HSQL.newEnvironment to use a function pointer to the C function
SQLFreeEnv to create the ForeignPtr.
- Hugs does not derive instances of Typeable, so instance declarations
for Typeable SqlError was added.
I have also modified the build system to support Hugs. I have never
worked with autoconf before, so my changes could be a little dodgy.
This patch requires at least Hugs-Nov2003 (older versions do for example
not support dynamic exceptions) and GHC 6.2 (older versions have a
non-standard argument order for newForeignPtr). I have only tested the
ODBC module, and only under Linux, but at least they all compile.
Best regards,
Bjorn Bringert
|